RedHat6.5安裝Gcc與Gcc-c++需要的包

其實本來我是要安裝OSDB測試數據庫的,但是config的時候報了以下錯誤:

[root@bogon OSDB-CPP]# ./configure
(中間沒甚麽用,就省略掉了)
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/home/weixin/Desktop/OSDB-CPP':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
網上搜索configure: error: C++ compiler cannot create executables有人建議重裝gcc,反正系統也是剛裝的,就試著重裝一下吧

然後就是搜索到安裝gcc需要安裝的包(這是我從百度文庫搜索到的):


順序不能亂:

rpm -ivh glibc-common-2.12-1.47.el6.x86_64.rpm
rpm -ivh kernel-headers-2.6.32-220.el6.x86_64.rpm
rpm -ivh libgcc-4.4.6-3.el6.x86_64.rpm
rpm -ivh glibc-2.12-1.47.el6.x86_64.rpm
rpm -ivh libgomp-4.4.6-3.el6.x86_64.rpm
rpm -ivh nscd-2.12-1.47.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.47.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.47.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh cpp-4.4.6-3.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-3.el6.x86_64.rpm

然後是gcc-c++的包:

rpm -ivh libstdc++-4.4.6-3.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.6-3.el6.x86_64
rpm -ivh gcc-c++-4.4.6-3.el6.x86_64.rpm

我先把GCC重裝一遍,但是沒有解決我安裝工具出現的錯誤,然後我又安裝gcc-c++,結果問題解決了

看來出現configure: error: C++ compiler cannot create executables這個問題,可以撞下gcc-c++


網上也有人說執行

sh   export LIBS=
sh   export CFLAGS=

這兩句話,不過我的系統報No such file or directory,不知道什麽原因,不過目前問題解決了,我就先不管了,以後有時間在研究吧

你可能感兴趣的:(RedHat)