728x90
gcc 버전 업데이트
vault 사용해야 한다. 이전 포스팅에서 참조한 블로그를 보면 지금 CentOS 7이 EOL(End Of Life) 이므로 더 이상 지원하지 않는다. 그래서 이전 업데이트가 보관되어 있는 vault 환경에서 install 하도록 다운로드 repository를 수정하는 작업이다.
저번에 Base.repo는 수정했으니까 거기는 됐는데도
sudo yum install devtoolset-10-gcc devtoolset-10-gcc-c++
이 안된다. 그러면
Could not resolve host: mirrorlist.centos.org
curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
이런 오류 코드가 발생하는데, 그러면 이미 EOL이 되어서 더 이상 불가능한 mirrorlist를 참조하려고 해서 그렇다. 이 부분을 수정해야 한다.
sudo gvim /etc/yum.repos.d/CentOS-SCLo-rh.repo
파일을 만들어서
[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=http://vault.centos.org/centos/7.9.2009/sclo/x86_64/rh/
enabled=1
gpgcheck=0
[centos-sclo-rh-source]
name=CentOS-7 - SCLo rh Source
baseurl=http://vault.centos.org/centos/7.9.2009/sclo/Source/rh/
enabled=0
gpgcheck=0
코드를 작성한다. 그러면 정상 작동 할 것이다.
그래도 안된다면 아직 mirrorlist를 참조하는 파일이 있어서 그렇다는 건데, 내 경우에는 CentOS-SCLo-scl.repo에 있어서 해당 파일을 백업하고 지워봤더니 해결 되었다.
sudo mv /etc/yum.repos.d/CentOS-SCLo-scl.repo /etc/yum.repos.d/backup/
그 후 cache 갱신
sudo yum clean all
sudo yum makecache
이렇게 설정한 후에
sudo enable devtoolset-10 bash
하면 된다.
terminal
터미널 열고 우클릭 Preference 실행 후 Colours에서 Use colurs from system theme 체크 해제
.vimrc
#테마 어둡게 설정
set background=dark
syntax on
colorscheme desert
set tabstop=4
set number
set cindent
set smartindent
set softtabstop=4
set shiftwidth=4
set ruler
set expandtab
set guioptions-=m #메뉴바 삭제
set guioptions-=T #툴바 삭제
.bashrc
# .bashrc
alias gcc=/opt/rh/devtoolset-10/root/usr/bin/gcc
alias g++=/opt/rh/devtoolset-10/root/usr/bin/g++
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
ChatGPT 추천 사용 방식
.bashrc
echo 'source /opt/rh/devtoolset-10/enable' >> ~/.bashrc
source ~/.bashrc
728x90
'( * )Engineering > 🐧Linux' 카테고리의 다른 글
CentOS 7 (0) | 2025.03.10 |
---|---|
[Linux] Linux 환경에서 Verilog. (0) | 2024.07.13 |
[Linux] Ubuntu 한글 설정 / vim 한글 설정 (0) | 2024.07.13 |
[Linux] Linux Server 제작기 (0) | 2024.05.19 |
[Linux] 리눅스 명령어 (0) | 2024.05.18 |