首页 > 其他 > 详细

centos安装g++

时间:2020-06-15 20:33:01      阅读:70      评论:0      收藏:0      [点我收藏+]

直接使用(管理员权限进行):

yum install gcc-c++

遇到报错:

Error downloading packages:
  libstdc++-devel-4.8.5-39.el7.x86_64: [Errno 256] No more mirrors to try.
  gcc-c++-4.8.5-39.el7.x86_64: [Errno 256] No more mirrors to try.

解决办法:

yum clean all
yum makecache

继续安装成功。

yum install gcc-c++

查看:

g++ -v

输出:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

 

centos安装g++

原文:https://www.cnblogs.com/juluwangshier/p/13135787.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!