centOS系统安装g++

    xiaoxiao2026-04-25  13

    1.检查gcc,可以看到版本号码,说明gcc已经安装

    [root@localhost ~]# gcc -v 使用内建 specs。 目标:x86_64-redhat-linux 配置为:../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-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux 线程模型:posix gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

    2.检查g++,提示“command not found”,说明g++未安装

    [root@localhost ~]# g++ -bash: g++: command not found

    3.安装g++

    [root@localhost ~]# yum install gcc-c++

    其实就是安装的gcc-c++-4.4.7-17.el6.x86_64.rpm以及它的依赖包libstdc++-devel-4.4.7-17.el6.x86_64.rpm

     

    4.安装完毕检查g++,可以看到版本号码说明安装成功

    [root@localhost ~]# g++ -v 使用内建 specs。 目标:x86_64-redhat-linux r-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux 线程模型:posix gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

     

    转载请注明原文地址: https://ju.6miu.com/read-1309208.html
    最新回复(0)