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.

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:
libtalloc.so.1 is needed by samba-3.6.7

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

share|improve this question

3 Answers 3

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 libtalloc.so.1. 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 libtalloc.so.1. There was no requires entry for libtalloc.so.1 in the spec file, which is why I was confused. –  LouisC Aug 31 '12 at 18:55

libtalloc.so.1 was added by the automatic dependency generator which isn't infallible.

Another possibility is that something in your build actually linked against libtalloc.so.1 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}-filter-requires.sh
%define __perl_requires %{SOURCE1}

Then %{name}-filter-requires.sh is:

#!/bin/sh

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

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.