CentOS 6.10 에 GCC 9.2.0 설치
2362 단어 기초 이론운영 체제Golang 프로 그래 밍
1. 운영 체제: CentOS 6.10
2. GMP: 버 전 6.2.0, 다운로드 링크:https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz
3. MPC: 버 전 1.1.0, 다운로드 링크:http://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
4. MPFR: 버 전 4.0.2, 다운로드 링크:https://www.mpfr.org/mpfr-current/mpfr-4.0.2.tar.xz
5. GCC: 버 전 9.2.0, 다운로드 링크:http://mirror.hust.edu.cn/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz
2. 상기 파일 의 최신 버 전 다운로드
3. 설치 스 크 립 트 는 다음 과 같 습 니 다.
폴 더 를 만 든 다음 이 네 개의 파일 을 모두 이 폴 더 아래 에 복사 합 니 다.그리고 su root, 아래 부분 을 스 크 립 트 파일 build. sh 로 만 듭 니 다.
#!/bin/bash
dir=$(pwd)
echo $dir
cd $dir
rm -rf gmp-6.2.0
tar -xf gmp-6.2.0.tar.xz
cd gmp-6.2.0
./configure --disable-shared --enable-static --prefix=$dir/extern
make && make install
echo "----------------gmp-6.2.0 over------------------"
cd $dir
rm -rf mpfr-4.0.2
tar -xf mpfr-4.0.2.tar.xz
cd mpfr-4.0.2
./configure --disable-shared --enable-static --prefix=$dir/extern --with-gmp=$dir/extern
make && make install
echo "----------------mpfr-4.0.2 over------------------"
cd $dir
rm -rf mpc-1.1.0
tar -xf mpc-1.1.0.tar.gz
cd mpc-1.1.0
./configure --disable-shared --enable-static --prefix=$dir/extern --with-gmp=$dir/extern --with-mpfr=$dir/extern
make && make install
echo "----------------mpc-1.1.0 over------------------"
cd $dir
rm -rf gcc-9.2.0
tar -xf gcc-9.2.0.tar.xz
cd gcc-9.2.0
./configure --prefix=/usr/local/gcc --with-gmp=$dir/extern --with-mpfr=$dir/extern --with-mpc=$dir/extern --enable-checking=release --enable-languages=c,c++ --disable-multilib
make -j2
make install
위 스 크 립 트 파일 을 실행 합 니 다.잠시 만 기다 리 면 최신 gcc 9.2.0 을 시스템 에 설치 할 수 있 습 니 다.
4. 설치 가 완 료 된 후에 관련 환경 설정 도 해 야 합 니 다.
내 설치 폴 더 는 / usr / local / gcc 입 니 다. 설정 은 다음 과 같 습 니 다.
#!/bin/bash
gccDir=/usr/local/gcc
rm -f /etc/profile.d/gcc.sh
echo "export PATH=$gccDir/bin:\$PATH" >>/etc/profile.d/gcc.sh
source /etc/profile.d/gcc.sh
gcc -v
echo "----------gcc bin path ok-----------"
rm -f /usr/include/gcc
ln -sv $gccDir/include/ /usr/include/gcc
echo "----------gcc include path ok-----------"
rm -f /etc/ld.so.conf.d/gcc.conf
echo "$gccDir/lib64" >>/etc/ld.so.conf.d/gcc.conf
ldconfig -v >>out
rm -f out
ldconfig -p |grep gcc
echo "----------gcc lib64 path ok-----------"
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
제2장 모듈 매개 변수일부 모듈은 불러올 때 서로 다른 매개 변수에 따라 서로 다른 기능을 만들어야 할 수도 있다.이 매개 변수의 값은 insmod나modprobe 명령으로 불러올 때 직접 지정할 수 있습니다.물론, 당신의 코드는 모듈 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.