도찐개찐

[CentOS|C/C++] Devtoolset으로 최신 컴파일러 적용 방법 본문

Infra -------------------------/linux

[CentOS|C/C++] Devtoolset으로 최신 컴파일러 적용 방법

도개진 2023. 9. 22. 13:10

configure: error: uint64_t or int64_t not found

컴파일러 버전이 맞지 않아 발생 된 문제로 해당 문제를 해결하기 위해서는 아래 방법을 따르면 됩니다.

제약 조건

CentOS 6 이상 환경

 

설치 방법

# 1. centos-release-scl 설치
yum --enablerepo=extras install centos-release-scl
 
# 2. 업데이트
yum update
 
# 3. devtoolset-8 설치
yum install -y devtoolset-8
 
# 4. scl 실행
scl enable devtoolset-8 bash

최신 컴파일러로 전환

# 명시적으로 devtoolset-7 적용 (devtoolset 하위 버전도 적용 가능)
source /opt/rh/devtoolset-8/enable

Shell 접속 시 자동으로 최신 컴파일러 적용 방법

echo -e "source /opt/rh/devtoolset-8/enable" >> ~/.bashrc
728x90
Comments