# curl -Lks http://www.hop5.in/yum/el6/hop5.repo > /etc/yum.repos.d/hop5.repo

# cat  /etc/yum.repos.d/hop5.repo
[hop5]
name=www.hop5.in Centos Repository
baseurl=http://www.hop5.in/yum/el6/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-HOP5

# yum install gcc gcc-g++ -y

额外编译安装

# wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.1/gcc-4.8.1.tar.bz2

# tar xf gcc-4.8.1.tar.bz2 

# cd gcc-4.8.1/

# ./contrib/download_prerequisites

# mkdir gcc-build

# cd gcc-build/

# ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib --prefix=/usr/local/gcc-4.8.1

# make -j4 && make install

# ln -sv /usr/local/gcc-4.8.1/bin/gcc /usr/local/bin/

# ln -sv /usr/local/gcc-4.8.1/bin/g++  /usr/local/bin/

# export LD_LIBRARY_PATH=/usr/local/gcc-4.8.1/lib/:$LD_LIBRARY_PAT

# cat > /etc/ld.so.conf.d/gcc-4.8.1.conf << EOF
/usr/local/gcc-4.8.1/lib64/
EOF

# ldconfig

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2019-09-25
  • 2021-07-12
  • 2021-10-29
猜你喜欢
  • 2022-01-16
  • 2021-12-09
  • 2021-09-03
  • 2022-03-01
  • 2021-12-19
  • 2022-02-05
  • 2022-12-23
相关资源
相似解决方案