Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The package in question is samba-3.6.7. I've built the package successfully, but when trying to install it, it returns,

error: failed dependencies: is needed by samba-3.6.7

I have no clue why this happens. is provided by my current samba package (which I am replacing), but this new samba provides and Why is it still dependent on and how can I fix it?

share|improve this question
up vote 2 down vote accepted

Build your RPMs using mock. This builds within a chroot containing only the necessary packages for building the RPM and helps to prevent situations like this.

share|improve this answer
And as an added bonus, it'll help you find build requirements you missed. – Ignacio Vazquez-Abrams Sep 1 '12 at 17:03

Edit the spec file and remove the requires entry for Rebuild and it should work. Having those metadata entries incorrect can be rather hard to track down.

share|improve this answer
I actually fixed the error by forcing the rpm upgrade, and then rebuilding the rpm. Now, when I remove the rpm and reinstall it using the new rpm, it no longer complains about There was no requires entry for in the spec file, which is why I was confused. – LouisC Aug 31 '12 at 18:55 was added by the automatic dependency generator which isn't infallible.

Another possibility is that something in your build actually linked against which is why build environments are important.

Assuming the automatic dependency generator is failing and you want to fix it you do so by overriding __perl_requires (depending on version of rpm) in your spec file:

source1: %{name}
%define __perl_requires %{SOURCE1}

Then %{name} is:


/usr/lib/rpm/perl.req $* |\
  sed -e '/'
share|improve this answer

Your Answer


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.