原文:http://raksmart.idcspy.com/781

在CentOS上的Canon LBP2900安装打印机驱动,中间遇到了一些问题,主要是安装rpm包出现的依赖问题,现在解决了,现在简单总结一下。
首先说明一下,我用的CentOS版本是6.6,64位。
打印机驱动程序是两个rpm安装包:
cndrvcups-common-2.60-1.x86_64.rpm和cndrvcups-capt-2.60-1.x86_64.rpm。
执行安装命令rpm -ivh cndrvcups-common-2.60-1.x86_64.rpm,出现依赖项错误,错误代码如下:

[root@cSlave00 RPM]# rpm -ivh cndrvcups-common-2.60-1.x86_64.rpm
error: Failed dependencies:
libc.so.6 is needed by cndrvcups-common-2.60-1.x86_64
libc.so.6(GLIBC_2.0) is needed by cndrvcups-common-2.60-1.x86_64
libc.so.6(GLIBC_2.1) is needed by cndrvcups-common-2.60-1.x86_64
libc.so.6(GLIBC_2.1.3) is needed by cndrvcups-common-2.60-1.x86_64
libc.so.6(GLIBC_2.3) is needed by cndrvcups-common-2.60-1.x86_64
libdl.so.2 is needed by cndrvcups-common-2.60-1.x86_64
libdl.so.2(GLIBC_2.0) is needed by cndrvcups-common-2.60-1.x86_64
libdl.so.2(GLIBC_2.1) is needed by cndrvcups-common-2.60-1.x86_64
libm.so.6 is needed by cndrvcups-common-2.60-1.x86_64
libm.so.6(GLIBC_2.0) is needed by cndrvcups-common-2.60-1.x86_64
libpthread.so.0 is needed by cndrvcups-common-2.60-1.x86_64
libpthread.so.0(GLIBC_2.0) is needed by cndrvcups-common-2.60-1.x86_64
libpthread.so.0(GLIBC_2.1) is needed by cndrvcups-common-2.60-1.x86_64
libpthread.so.0(GLIBC_2.3.2) is needed by cndrvcups-common-2.60-1.x86_64
librt.so.1 is needed by cndrvcups-common-2.60-1.x86_64
libstdc++.so.6 is needed by cndrvcups-common-2.60-1.x86_64
libstdc++.so.6(CXXABI_1.3) is needed by cndrvcups-common-2.60-1.x86_64

在网上进行一番搜索,解决方法都是安装缺少的依赖库即可。但是搜索后发现,本机上有些库已经安装了。
比如libc.so.6,该库对应的软件包名称为glibc。

[root@cSlave00 RPM]# yum list glibc*
已加载插件:fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.cug.edu.cn
* extras: mirrors.cug.edu.cn
* updates: mirrors.skyshe.cn
已安装的软件包 glibc.x86_64 2.12-1.149.el6
@anaconda-CentOS-201410241409.x86_64/6.6
glibc-common.x86_64 2.12-1.149.el6
@anaconda-CentOS-201410241409.x86_64/6.6
glibc-devel.x86_64 2.12-1.149.el6
@anaconda-CentOS-201410241409.x86_64/6.6
glibc-headers.x86_64 2.12-1.149.el6
@anaconda-CentOS-201410241409.x86_64/6.6
可安装的软件包
glibc.i686 2.12-1.149.el6 base
glibc-devel.i686 2.12-1.149.el6 base
glibc-static.i686 2.12-1.149.el6 base
glibc-static.x86_64 2.12-1.149.el6 base
glibc-utils.x86_64 2.12-1.149.el6 base

那么问题来了,既然已经安装了libc.so.6,为什么还是提示缺少该库呢?继续找啊找,百度搜索基本上无果,只能寄希望于谷歌。终于,搞定科学上网,谷歌能上了,继续搜索,重点关注英文结果。最后,总算在Stack Overflow上找到了类似的问题与解答,点击这里查看原文。
这里只摘录关键的几句话:

In Red Hat Enterprise Linux 5, if a package was available for both the main and the compatibility architectures, both architectures of the package were installed by default.In Red Hat Enterprise Linux 6, only the package for the primary architecture is installed by default.To avoid problems during the backup-archive client and API installation on a 64-bit machine, be sure to install libstdc++ and compat-libstdc++.

大意是说,从Red Hat Enterprise Linux 6开始,默认只安装主架构所需要的包,而不安装兼容架构的包,也就是说,64位系统默认只安装64位的软件包。为避免这种问题,在64位系统中,要同时安装64位的包和32位的兼容包。CentOS和从Red Hat Enterprise Linux 6的关系就不用我说了,因此我感觉这个回答比较靠谱,赶紧试试吧。

[root@cSlave00 RPM]# yum install glibc.i686
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
……
已安装:
glibc.i686 0:2.12-1.149.el6
作为依赖被安装: nss-softokn-freebl.i686 0:3.14.3-18.el6_6
作为依赖被升级: nss-softokn-freebl.x86_64 0:3.14.3-18.el6_6 完毕!
[root@cSlave00 RPM]# rpm -ivh cndrvcups-common-2.60-1.x86_64.rpm error: Failed
dependencies:
libstdc++.so.6 is needed by cndrvcups-common-2.60-1.x86_64
libstdc++.so.6(CXXABI_1.3) is needed by
cndrvcups-common-2.60-1.x86_64
结果令人满意,果然不再提示libc.so.6了。继续解决libstdc++.so.6!
[root@cSlave00 RPM]# yum list libstdc++*
已加载插件:fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.sjtu.edu.cn
* extras: mirrors.163.com
* updates: ftp.sjtu.edu.cn
已安装的软件包
libstdc++.x86_64 4.4.7-11.el6
@anaconda-CentOS-201410241409.x86_64/6.6
可安装的软件包
libstdc++.i686 4.4.7-11.el6 base libstdc++-devel.i686 4.4.7-11.el6 base
libstdc++-devel.x86_64 4.4.7-11.el6 base
libstdc++-docs.x86_64 4.4.7-11.el6 base
[root@cSlave00 RPM]# yum install libstdc++.i686
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程 ……
已安装:
libstdc++.i686 0:4.4.7-11.el6
作为依赖被安装: libgcc.i686 0:4.4.7-11.el6
完毕!
[root@cSlave00 RPM]# rpm -ivh cndrvcups-common-2.60-1.x86_64.rpm
Preparing… ########################################### [100%]
1:cndrvcups-common ########################################### [100%]
至此,终于解决了依赖问题,cndrvcups-common-2.60-1.x86_64.rpm终于安装成功。用同样的方法,也顺利地把cndrvcups-capt-2.60-1.x86_64.rpm安装成功。

总结:在安装rpm包的时候,如果出现类似libc.so.6 is needed by XXX的依赖问题,首先检查一下本机是否安装了相应的依赖库;如果本机确实已经安装了所需的依赖库而问题依旧,那就试试把相应的兼容包安装一下,问题应该就能迎刃而解了!

rpm包安装过程中依赖问题“libc.so.6 is needed by XXX”解决方法-转的更多相关文章

  1. rpm包安装过程中依赖问题“libc.so.6 is needed by XXX”解决方法

    rpm包安装过程中依赖问题"libc.so.6 is needed by XXX"解决方法 折腾了几天,终于搞定了CentOS上的Canon LBP2900打印机驱动.中间遇到了一 ...

  2. ubuntu 可能的依赖包,安装过程中根据需要安装

    /*************依赖包安装****************/下面是可能的依赖包,安装过程中根据需要安装 build-essential - libglib2.-dev libpng3 li ...

  3. git提交过程中遇到的 index.lock 问题导致无法提交的解决方法

    在提交代码的过程中,可能会遇到下面的问题: fatal: Unable to create 'C:/programLists/zzw-q1/.git/index.lock': File exists. ...

  4. rpm 包安装调试缺少依赖无法安装的方法

    今天在给龙芯中标机器安装360 10.0.2001.1 版本时 发现有依赖过不去. 因为依赖关系而调过软件包: browser360-cn-stable-10.0.2001.0-1.mips64el ...

  5. Gephi安装过程中出现错误:can’t find java 1.8 or higher

    Gephi具体的安装过程我就不多说了,一直点击下一步就OK了,我想说的是出现如下图这种或者类似的错误怎么解决. 在百度的过程中发现很多的博文等等出现这个错误的解决方法都是安装对应版本的JDK啊,配置对 ...

  6. CentOS使用yum源中自带的rpm包安装LAMP环境

    CentOS使用yum源中自带的rpm包安装LAMP环境.这是Linux下安装LAMP的环境一种最基本最简便的方式.新手可以从容安装使用. 1. 安装基础包(可选安装)yum install -y w ...

  7. 在工作有时候centos6.5系统使用rpm包安装mysql5.7出现的问题

    首先说明一下,我用的CentOS版本是6.6,64位.打印机驱动程序是两个rpm安装包:cndrvcups-common-2.60-1.x86_64.rpm和cndrvcups-capt-2.60-1 ...

  8. rpm包安装

    RPM全称是“RedHatPackageManager”是由RedHat公司发发展起来的,本质是将软件源码包经过编译并且打包成rpm的格式,rpm文件包含的有二进制文件,配置文件,库文件等,同时RPM ...

  9. zabbix安装及配置(rpm包安装mysql,php,apache,zabbix)

    zabbix安装及配置 一.安装mysql.php.apache.zabbix 安装环境: 操作系统:rhel6.3-x86-64  mysql:5.6.23   --官网下载rpm包安装php:5. ...

随机推荐

  1. log-slave-updates参数

    从库做为其他从库的主库时 log-slave-updates参数是必须要添加的,因为从库要作为其他从库的主库,必须添加该参数.该参数就是为了让从库从主库复制数据时可以写入到binlog日志,为什么要用 ...

  2. 字体jquery ---

    You don’t need icons! Here are 100+ unicode symbols that you can use Danny Markov December 3rd, 2014 ...

  3. Java int和Integer包装类的区别和比较

    区别:                                                                                                  ...

  4. leetcode-240-搜索二维矩阵②

    题目描述: 最佳方法:O(m+n) O(1) class Solution: def searchMatrix(self, matrix, target): if not matrix : retur ...

  5. C++ BASS 实例

    #include <iostream> #include <string> #include <map> #include "..\sdk\bass\in ...

  6. 二分图带权匹配-Kuhn-Munkres算法模板 [二分图带权匹配]

    尴尬...理解不太好T T #include<cstdio> #include<cstring> #include<iostream> #include<al ...

  7. flink提交文件出现java.io.IOException:unable to close file because the last block does not have enough number of replicas异常

    当提交已经打包好的jar包时候,控制台出现以下的错误.

  8. (37)C#Linq

    https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/let-clause 一.定义 Linq(Lang ...

  9. LightOJ-1007-Mathematically Hard-欧拉函数打表+前缀和+预处理

    Mathematically some problems look hard. But with the help of the computer, some problems can be easi ...

  10. 如何使用Python-GnuPG和Python3 实现数据的解密和加密

    介绍 GnuPG包提供用于生成和存储加密密钥的完整解决方案.它还允许您加密和签名数据和通信. 在本教程中,您将创建一系列使用Python 3和python-gnupg模块的脚本.这些脚本允许您对多个文 ...