在安装rpm -ivh后,Yum无法解析依赖关系

时间:2013-12-13 06:05:17

标签: dependency-management rpm yum rpmbuild rpm-spec

  1. 我使用AWS EC2实例。
  2. 我想设置一个版本为5.4.0的软件包,但yum search all --enablerepo epel提供的最新版本是5.0.0。
  3. 因此,我在网站上提供了v5.4.0上的wgetconfigure && make && make install
  4. 由于我们做了很多实例的起伏,这个解决方案太耗时(编译时)成为部署的可行解决方案。

    1. 然后我从版本为5.4.0的tar.bz2构建了一个RPM。为了确保环境之间的库和依赖项没有区别,我在相同的实例上运行rpmbuild作为部署AMI。
    2. 在测试服务器上构建并部署RPM之后,我尝试将gearmand安装到以下结果 -
    3. [ec2-user@ip-10-0-0-62 ~]$ sudo yum install --enablerepo=epel gearmand
      
      Loaded plugins: priorities, update-motd, upgrade-helper
      565 packages excluded due to repository priority protections
      Resolving Dependencies
      --> Running transaction check
      ---> Package gearmand.x86_64 0:1.1.8-2.el6 will be installed
      --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libpq.so.5()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libgearman.so.8()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libevent-1.4.so.2()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libboost_system.so.5()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libboost_program_options-mt.so.5()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Running transaction check
      ---> Package compat-boost-program-options.x86_64 0:1.41.0-11.10.amzn1 will be installed
      ---> Package compat-boost-system.x86_64 0:1.41.0-11.10.amzn1 will be installed
      ---> Package compat-libevent.x86_64 0:1.4.13-4.10.amzn1 will be installed
      ---> Package gearmand.x86_64 0:1.1.8-2.el6 will be installed
      --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
      ---> Package libgearman.x86_64 0:1.1.8-2.el6 will be installed
      ---> Package postgresql9-libs.x86_64 0:9.2.5-1.37.amzn1 will be installed
      --> Finished Dependency Resolution
      Error: Package: gearmand-1.1.8-2.el6.x86_64 (epel)
                 Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)
      Error: Package: gearmand-1.1.8-2.el6.x86_64 (epel)
                 Requires: libmysqlclient.so.16()(64bit)
       You could try using --skip-broken to work around the problem
       You could try running: rpm -Va --nofiles --nodigest
      

      这让我怀疑RPM安装在某种意义上是“冻结和阻塞”它所依赖的库。我觉得这样,因为在构建RPM时,软件包需要比亚马逊或epel repos上提供的库更高的库版本。一些例子 -

      +-------------+-------------------+----------------+
      |    name     |  amazon version   |  library wants |
      +-------------+-------------------+----------------+
      |   glibc     |       2.12        |      2.16      |
      |   perl      |       5.10        |      5.18      |
      |  python     |       2.6.9       |      2.7       |
      +-------------+-------------------+----------------+
      

      我在这里做错了什么,在构建RPM之前是否需要在源/规范中更改某些内容?因为这看起来只是冰山一角。

1 个答案:

答案 0 :(得分:0)

更改rpm-spec文件,您可以在其中编辑所需的依赖项版本