Linux安裝gcc時碰到的有關問題解決(解決gcc依賴有關問題)學習
rpm安裝gcc時碰到的有關問題解決(解決gcc依賴有關問題)spa
提示:error: Failed dependencies:code
cloog-ppl >= 0.15 is needed by gcc-4.4.7-4.el6.x86_64ci
cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64it
rpm安裝cloog-ppl會報: io
error: Failed dependencies:table
libppl.so.7()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64import
libppl_c.so.2()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64gcc
rpm安裝cpp會報:軟件
error: Failed dependencies:
libmpfr.so.1()(64bit) is needed by cpp-4.4.7-4.el6.x86_64
安裝軟件包前期準備工做:
1.掛載光盤鏡像到mnt目錄下。(學習推薦),下面說說掛載命令
[root@localhost ~]
# mount /dev/cdrom /mnt/
[root@localhost Packages]
#
|
掛載成功後,進入到包所在目錄
[root@localhost ~]
# cd /mnt/Packages/
[root@localhost Packages]
#
|
2.網上去下載須要安裝的包。
在安裝gcc時咱們基本都會碰到這樣的錯誤提示:
1》 安裝gcc包,並報錯了:
[root@localhost Packages]
# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm
warning: gcc-4.4.7-4.el6.x86_64.rpm: Header V3 RSA
/SHA1
Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
cloog-ppl >= 0.15 is needed by gcc-4.4.7-4.el6.x86_64
cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
[root@localhost Packages]
#
|
上面的報錯說明:缺乏兩個依賴關係包(cloog-ppl和cpp),那麼咱們只須要安裝這兩個包就好了。
2》 安裝cloog-ppl包:
[root@localhost Packages]
# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA
/SHA256
Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
libppl.so.7()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64
libppl_c.so.2()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64
[root@localhost Packages]
#
|
上面的報錯:其實就是少了一個ppl包!
3》 安裝ppl包:
[root@localhost Packages]
# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA
/SHA256
Signature, key ID c105b9de: NOKEY
Preparing...
########################################### [100%]
1:ppl
########################################### [100%]
[root@localhost Packages]
#
|
成功安裝ppl包!
4》 回過頭安裝cloog-ppl包:
[root@localhost Packages]
# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA
/SHA256
Signature, key ID c105b9de: NOKEY
Preparing...
########################################### [100%]
1:cloog-ppl
########################################### [100%]
[root@localhost Packages]
#
|
成功安裝cloog-ppl包!
5》 安裝cpp包:
[root@localhost Packages]
# rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm
warning: cpp-4.4.7-4.el6.x86_64.rpm: Header V3 RSA
/SHA1
Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
libmpfr.so.1()(64bit) is needed by cpp-4.4.7-4.el6.x86_64
[root@localhost Packages]
#
|
上面的報錯:其實就是少了一個mpfr包!
6》 安裝mpfr包:
[root@localhost Packages]
# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
warning: mpfr-2.4.1-6.el6.x86_64.rpm: Header V3 RSA
/SHA256
Signature, key ID c105b9de: NOKEY
Preparing...
########################################### [100%]
1:mpfr
########################################### [100%]
[root@localhost Packages]
#
|
成功安裝mpfr包!
7》 回過頭安裝cpp包:
[root@localhost Packages]
# rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm
warning: cpp-4.4.7-4.el6.x86_64.rpm: Header V3 RSA
/SHA1
Signature, key ID c105b9de: NOKEY
Preparing...
########################################### [100%]
1:cpp
########################################### [100%]
[root@localhost Packages]
#
|
成功安裝cpp包
8》 這個時候安裝gcc時,報缺乏的兩個包如今都裝上,咱們再來裝一個gcc:
[root@localhost Packages]
# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm
warning: gcc-4.4.7-4.el6.x86_64.rpm: Header V3 RSA
/SHA1
Signature, key ID c105b9de: NOKEY
Preparing...
########################################### [100%]
1:gcc
########################################### [100%]
[root@localhost Packages]
#
|
成功安裝gcc,固然你也能夠用yum來安裝(自動幫助解決依賴關係)!