Linux

centos7 install gcc 4.9.x

Naan 2023. 2. 26. 00:04
반응형

centos7 install gcc 4.9.x 하는 방법이다.

centos7 gcc 최신 버전은

# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

4.8.5 버전이다 yum 으로 설치해도 4.8.5 이상 안올라간다.

수동으로 설치를 진행해야 한다.

 

우선 선행으로 설치 되어야 할것들이 있다.

yum install libmpc-devel mpfr-devel gmp-devel

gcc 4.9.2 버전 다운 받고

https://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2

압축을 풀자.

# tar -xvf gcc-4.9.2.tar.bz2

# cd gcc-4.9.2

# ./configure --disable-multilib --enable-languages=c,c++

# make -j 4

# make install

# gcc --version
gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc 4.9.2 버전으로 완료!!

반응형