我在安装一组自定义构建rpm时遇到问题. spec文件产生7个二进制rpms.我使用rpm -ivh安装了其中的5个,然后决定我还需要剩下的两个.当我尝试安装它们时,rpm抱怨:
# sudo rpm -ivh foo-lib-cpp-devel-0.7.0-1.x86_64.rpm error: Failed dependencies: foo = 0.7.0-1 is needed by foo-lib-cpp-devel-1:0.7.0-1.x86_64
然而,已经安装了确切的依赖:
# rpm -q foo foo-0.7.0-1.x86_64
我发现’rpm -R’,它提供了有关包的更多细节:
# rpm -qvRp foo-lib-cpp-devel-0.7.0-1.x86_64.rpm auto: /usr/bin/pkg-config manual: boost-devel manual: libevent-devel >= 1.2 auto: libfoo.so.0()(64bit) auto: libfootnb.so.0()(64bit) auto: libfooz.so.0()(64bit) auto: pkgconfig(foo) = 0.7.0 rpmlib: rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib: rpmlib(FileDigests) <= 4.6.0-1 rpmlib: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib: rpmlib(VersionedDependencies) <= 3.0.3-1 manual: foo = 0.7.0-1 manual: zlib-devel rpmlib: rpmlib(PayloadIsXz) <= 5.2-1
我看到的唯一可疑的东西是lib-cpp-devel包中的’-1:’标记,我无法解释.
什么是’-1:’,这可能与这个问题有关吗?我该如何进一步调试或解决它? FWIW这是在相对全新的CentOS 6上安装的.
谢谢!
-1:标记是Epoch标记,所以看起来你的RPM可能是用Epoch等于1构建的.如果是这样的话,foo-lib-cpp-devel依赖于foo
must include the Epoch,如下所示:
原文链接:https://www.f2er.com/javaschema/281745.htmlRequires: foo = 1:0.7.0-1
或者,使用宏:
Requires: foo = %{epoch}:%{version}-%{release}