Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)
rpm安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)
提示: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
rpm安装cloog-ppl会报:
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
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来安装(自动帮助解决依赖关系)!