首先说明一下,我用的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的依赖问题,首先检查一下本机是否安装了相应的依赖库;如果本机确实已经安装了所需的依赖库而问题依旧,

最新文章

  1. 解决:Error: JAVA_HOME is not defined correctly
  2. 在网上看到的一篇文章关于js和php编码的
  3. eclipse中导入项目后中文成乱码解决办法
  4. SignalR + MVC5 简单示例
  5. centos彻底删除文件夹、文件命令(centos 新建、删除、移动、复制等命令)
  6. [转载]hao123军事频道首页JQ焦点图
  7. X86汇编语言中的registers相关
  8. mexopencv问题:Invalid MEX file GLIBCXX_3.4.15 error
  9. KTV2
  10. C++用new创建对象和不用new创建对象的区别解析
  11. Linux 4.20内核得到更新,英特尔CPU 性能降低50%
  12. vuesheng生命周期
  13. SrervletContext和文件下载
  14. shell和awk配合使用
  15. EF Code First:使用T4模板生成相似代码
  16. Win10图标显示不正常解决办法
  17. C#接收emoji表情存到sqlserver数据库
  18. egg- 配置
  19. 编译gearman提示缺少boost
  20. mysql语句, 空的 order by , 空的 where

热门文章

  1. Postgresql存储过程调试:PostgreSQL 之 Function NOTICE
  2. Linux系统性能分析
  3. Android实现Layout缩放动画
  4. POJ 1637 混合图的欧拉回路判定
  5. go语言文件操作,这期资料比较详细( 欢迎加入go语言群: 218160862 )
  6. JAVA Web day02--- Android小白的第二天学习笔记
  7. check_env函数解析
  8. iOS--基础控件总结一
  9. bootstrap总结
  10. maven不打包子模块资源文件