Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having trouble installing a set of custom build rpms. The spec file produces 7 binary rpms. I installed 5 of them using rpm -ivh and then decided that I also needed the remaining two. When I try to install those, rpm complains:

# 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

Yet that exact dependency is already installed:

# rpm -q foo
foo-0.7.0-1.x86_64

I discovered 'rpm -R', which provides more details on the package:

# 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

The only suspicious thing I see is the '-1:' token in the lib-cpp-devel package, which I can't explain.

What is the '-1:' and could that be related to this issue? How can I debug this further or workaround it? FWIW this is all occuring on a relatively fresh install of CentOS 6.

Thanks!

share|improve this question
1  
-1 refers to the rpm release. For example, foo is version 0.7.0, rpm release 1. In the spec file, you'll commonly see it defined like: Release: 1%{?dist} –  alanthing Nov 10 '11 at 22:43
    
It's not the '-1' but the '-1:' (note the colon). The colon isn't present in the package filename. –  bfallik-bamboom Nov 11 '11 at 16:14
add comment

2 Answers

up vote 1 down vote accepted

The -1: token is the Epoch tag, so it looks like your RPM may have been built with an Epoch equaling 1. If that's the case, foo-lib-cpp-devel's dependency on foo must include the Epoch, like so:

Requires: foo = 1:0.7.0-1

Or, using macros:

Requires: foo = %{epoch}:%{version}-%{release}
share|improve this answer
    
Perfect, thanks! –  bfallik-bamboom Nov 11 '11 at 16:22
add comment

If you are absolutely sure that the two packages are compatible, you could do one of the following:

  1. Remove the current foo-lib-cpp-devel package using the --nodeps switch on rpm.

1a. Install the new foo-lib-cpp-devel package using rpm (may have to use --nodeps or --force switches)

OR
  1. Install the new foo-lib-cpp-devel package using the --force --nodeps switches on rpm.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.