2

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?

3 Answers 3

2

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.

1
  • And as an added bonus, it'll help you find build requirements you missed. Sep 1, 2012 at 17:03
1

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.

1
  • 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, 2012 at 18:55
0

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'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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