“缺少" rpm文件中存在lib时,用于rpm安装 [英] "Missing" lib for rpm install when it is present in rpm file

查看:295
本文介绍了“缺少" rpm文件中存在lib时,用于rpm安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为centos生成一个rpm文件,但是当我尝试将其安装在干净的计算机上时,它将失败并显示以下信息:

I'm generating an rpm file for centos but when I try to install it on a clean machine it fails with:

 --> Running transaction check
 ---> Package grass.x86_64 0:6.4.4-1.el6 will be installed
 --> Processing Dependency: libgrass_rli.so()(64bit) for package: grass-6.4.4-1.el6.x86_64
 --> Finished Dependency Resolution Error: Package: grass-6.4.4-1.el6.x86_64 (/grass-6.4.4-1.el6.x86_64)
            Requires: libgrass_rli.so()(64bit)

那很好,除了rpm包含libgrass_rli.so.

which would be fine except that the rpm contains libgrass_rli.so.

 [vagrant@localhost ~]$ rpm -qilp /vagrant_rpms/grass-6.4.4-1.el6.x86_64.rpm | grep _rli
 /usr/local/lib/libgrass_rli.6.4.4.so 
 /usr/local/lib/libgrass_rli.so

我尝试了各种方法:spec文件中的行无济于事,有人可以看到这是怎么回事吗?

I've experimented with various provides: lines in the spec file to no avail, can any one see what's wrong?

编辑

[vagrant@localhost ~]$ rpm -qp --provides /vagrant_rpms/grass-6.4.4-1.el6.x86_64.rpm                                                                            
libgrass_I.6.4.4.so()(64bit)                                                    
libgrass_Iortho.6.4.4.so()(64bit)                                               
libgrass_arraystats.6.4.4.so()(64bit)                                           
libgrass_bitmap.6.4.4.so()(64bit)                                               
libgrass_btree.6.4.4.so()(64bit)                                                
libgrass_cdhc.6.4.4.so()(64bit)                                                 
libgrass_cluster.6.4.4.so()(64bit)                                              
libgrass_datetime.6.4.4.so()(64bit)                                             
libgrass_dbmibase.6.4.4.so()(64bit)                                             
libgrass_dbmiclient.6.4.4.so()(64bit)                                           
libgrass_dbmidriver.6.4.4.so()(64bit)                                           
libgrass_dbstubs.6.4.4.so()(64bit)                                              
libgrass_dgl.6.4.4.so()(64bit)                                                  
libgrass_dig2.6.4.4.so()(64bit)                                                 
libgrass_display.6.4.4.so()(64bit)                                              
libgrass_driver.6.4.4.so()(64bit)                                               
libgrass_dspf.6.4.4.so()(64bit)
libgrass_edit.6.4.4.so()(64bit)
libgrass_form.6.4.4.so()(64bit)
libgrass_g3d.6.4.4.so()(64bit)
libgrass_gis.6.4.4.so()(64bit)
libgrass_gmath.6.4.4.so()(64bit)
libgrass_gpde.6.4.4.so()(64bit)
libgrass_gproj.6.4.4.so()(64bit)
libgrass_interpdata.6.4.4.so()(64bit)
libgrass_interpfl.6.4.4.so()(64bit)
libgrass_lidar.6.4.4.so()(64bit)
libgrass_linkm.6.4.4.so()(64bit)
libgrass_lrs.6.4.4.so()(64bit)
libgrass_neta.6.4.4.so()(64bit)
libgrass_nviz.6.4.4.so()(64bit)
libgrass_ogsf.6.4.4.so()(64bit)
libgrass_pngdriver.6.4.4.so()(64bit)
libgrass_psdriver.6.4.4.so()(64bit)
libgrass_qtree.6.4.4.so()(64bit)
libgrass_raster.6.4.4.so()(64bit)
libgrass_rli.6.4.4.so()(64bit)
libgrass_rli.so
libgrass_rowio.6.4.4.so()(64bit)
libgrass_rtree.6.4.4.so()(64bit)
libgrass_segment.6.4.4.so()(64bit)
libgrass_shape.6.4.4.so()(64bit)
libgrass_sim.6.4.4.so()(64bit)
libgrass_sites.6.4.4.so()(64bit)
libgrass_sqlp.6.4.4.so()(64bit)
libgrass_stats.6.4.4.so()(64bit)
libgrass_symb.6.4.4.so()(64bit)
libgrass_trans.6.4.4.so()(64bit)
libgrass_vask.6.4.4.so()(64bit)
libgrass_vect.6.4.4.so()(64bit)
libgrass_vedit.6.4.4.so()(64bit)
grass = 6.4.4-1.el6
grass(x86-64) = 6.4.4-1.el6

提取的文件也看起来不错:

Also the extracted file looks ok:

[vagrant@localhost ~]$ file /tmp/libgrass_rli.6.4.4.so
/tmp/libgrass_rli.6.4.4.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

推荐答案

rpmbuild通常会扫描打包到RPM中的所有文件,以自动识别RPM提供的共享库,并且RPM的要求可以自​​行满足.因此,主要有两种可能性:

rpmbuild normally scans all the files packaged into the RPM to automatically identify shared libraries the RPM provides, and an RPM's requirements can be self-satisfied. There are therefore two main possibilities:

  • 也许RPM包含库的i386(即32位)版本,而实际需要的是64位版本,或者打包文件的类型不正确;
  • 或者,rpmbuild的自动提供扫描功能可能已被禁用或被破坏(这是规范文件的功能).
  • perhaps the RPM contains an i386 (i.e. 32-bit) version of the library, whereas a 64-bit version is what's actually required, or in some other way the packaged file is not of the correct type;
  • alternatively, rpmbuild's automatic provides scanning may have been disabled or mucked up (this would be a function of the spec file).

除非您打包一个预先构建的库,或者除非您为同一RPM构建32位和64位库(并且无法安装后者,或者将二者都安装到该RPM中),否则不太可能出现错误的库体系结构.相同的位置,以便其中一个掩盖另一个).

A wrong library architecture is unlikely unless you are packaging a pre-built library, or unless you are building both 32-bit and 64-bit libraries for the same RPM (and failing to install the latter, or installing both to the same location so that one clobbers the other).

由于您是在自行开发RPM,所以我想您知道您是否对自动提供的服务感到厌烦.

Since you're developing the RPM yourself, I suppose you know whether you are mucking with the auto-provides.

这篇关于“缺少" rpm文件中存在lib时,用于rpm安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆