Linux |
您所在的位置:网站首页 › ivh医学 › Linux |
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目录下。(学习推荐),下面说说挂载命令 1 2 [root@localhost ~]# mount /dev/cdrom /mnt/ [root@localhost Packages]# 挂载成功后,进入到包所在目录 1 2 [root@localhost ~]# cd /mnt/Packages/ [root@localhost Packages]# 2.网上去下载需要安装的包。
在安装gcc时我们基本都会碰到这样的错误提示: 1》 安装gcc包,并报错了:
1 2 3 4 5 6 [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包:
1 2 3 4 5 6 [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包: 1 2 3 4 5 [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包: 1 2 3 4 5 [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包: 1 2 3 4 5 [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包: 1 2 3 4 5 [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包: 1 2 3 4 5 [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: 1 2 3 4 5 [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来安装(自动帮助解决依赖关系)!
【温馨提示】: 安装rpm包时,不知道包名。我们可以查找一下: 比如我要安装ppl包时,不知道全名时。先查看一下名字包扩ppl的rpm,那么下面我们在输要安装的包名时就方便了。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [root@localhost Packages]# ls *ppl* cloog-ppl-0.15.7-1.2.el6.i686.rpm cloog-ppl-0.15.7-1.2.el6.x86_64.rpm gdm-user-switch-applet-2.30.4-52.el6.x86_64.rpm gnome-applets-2.28.0-7.el6.centos.x86_64.rpm gnome-python2-applet-2.28.0-5.el6.x86_64.rpm kdebase-workspace-python-applet-4.3.4-24.el6.x86_64.rpm krb5-appl-clients-1.0.1-7.el6_2.1.x86_64.rpm krb5-appl-servers-1.0.1-7.el6_2.1.x86_64.rpm libpanelappletmm-2.26.0-3.el6.x86_64.rpm poppler-0.12.4-3.el6_0.1.i686.rpm poppler-0.12.4-3.el6_0.1.x86_64.rpm poppler-data-0.4.0-1.el6.noarch.rpm poppler-glib-0.12.4-3.el6_0.1.i686.rpm poppler-glib-0.12.4-3.el6_0.1.x86_64.rpm poppler-qt4-0.12.4-3.el6_0.1.x86_64.rpm poppler-utils-0.12.4-3.el6_0.1.x86_64.rpm ppl-0.10.2-11.el6.i686.rpm ppl-0.10.2-11.el6.x86_64.rpm sabayon-apply-2.29.92-3.el6.x86_64.rpm wpa_supplicant-0.7.3-4.el6_3.x86_64.rpm [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]#
安装时我们最好都导入一下RPM-GPG-KEY!验证一下RPM包! 作用:安装rpm包时,对rpm包进行签名验证。看看是不是RPM自己发布的! 如何导入: 1、先看查RPM-GPG-KEY所在地址: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 [root@localhost Packages]# ls /etc/yum.repos.d/ CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo [root@localhost Packages]# cat /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # #
[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [root@localhost Packages]# 这时个我们就知道地址是:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 2、导入RPM-GPG-KEY 1 [root@localhost Packages]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 效果对比: 【没导入前安装】: 1 2 3 4 5 [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]# 这时候会报:warning: gcc-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY 【导入后安装】: 1 2 3 4 [root@localhost Packages]# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm Preparing... ########################################### [100%] 1:gcc ########################################### [100%] [root@localhost Packages]# 这时候就不会上面报的警告错误了。 rpm包下载地址: http://rpmfind.net/ http://rpm.pbone.net/ http://www.rpmseek.com/index.html |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |