有那个Linux系统,一个系统存在g++,另一个没有g++
前提条件:
lincase15:
Lincase15_sam_1_1_1 SAM001:> which g++
/usr/bin/g++
Lincase15_sam_1_1_1 SAM001:> uname -a
Linux Lincase15_sam_1_1_1 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Lincase15_sam_1_1_1 SAM001:> cat /proc/version
Linux version 2.6.18-194.el5 (mockbuild@x86-005.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Mar 16 21:52:39 EDT 2010
Lincase15_sam_1_1_1 SAM001:> g++ -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)
lincase05:
Lincase05_sam_1_1_1 SAM001:> which g++
/usr/bin/which: no g++ in (/opt/TimesTen/spatial/bin:/Spatial/bin:/Spatial/msc/active/patch:/opt/Spatial/msc/active/bin:/Spatial/ems/active/patch:/opt/Spatial/ems/active/bin:/Spatial/tools:/opt/Spatial/msc/active/tools:/opt/Spatial/msc/active/tools/scripts:/opt/Spatial/msc/active/installation:/usr/xpg4/bin:/usr/board/tools/:/usr/board/tools/sol:/usr/sbin:/usr/bin:/bin:/sbin:.)
Lincase05_sam_1_1_1 SAM001:> uname -a
Linux Lincase05_sam_1_1_1 2.6.18-53.el5xen #1 SMP Wed Oct 10 16:48:44 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
Lincase05_sam_1_1_1 SAM001:> cat /proc/version
Linux version 2.6.18-53.el5xen (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:48:44 EDT 2007
Lincase05_sam_1_1_1 SAM001:> g++ -v
-bash: g++: command not found
问题:
我安装一款cppcheck 软件,安装不了,提示错误:
Lincase15_sam_1_1_1 SAM001:> make
g++ -Ilib -Iexternals -Iexternals/tinyxml -O2 -DNDEBUG -Wall -std=c++0x -c -o lib/check64bit.o lib/check64bit.cpp
g++: error trying to exec 'cc1plus': execvp: No such file or directory
make: *** [lib/check64bit.o] Error 1
Lincase05_sam_1_1_1 SAM001:> make
g++ -Ilib -Iexternals -Iexternals/tinyxml -O2 -DNDEBUG -Wall -std=c++0x -c -o lib/check64bit.o lib/check64bit.cpp
make: g++: Command not found
make: *** [lib/check64bit.o] Error 127
对于lincase05:
Lincase05_sam_1_1_1 SAM001:> yum install g++-cc
Loading "security" plugin
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: g++-cc
Nothing to do
Lincase05_sam_1_1_1 SAM001:> yum install g++
Loading "security" plugin
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: g++
Nothing to do
对于lincase15:
Lincase15_sam_1_1_1 SAM001:> yum install g++-cc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package g++-cc available.
Nothing to do
Lincase15_sam_1_1_1 SAM001:> yum install g++
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package g++ available.
Nothing to do
查了些相关资料:This system is not registered with RHN.因为红帽中没有注册RHN
如何解决这个问题,求大神指点。最好能具体点,谢谢!

