-1

I am using CentOS 5. I have created an rpm spec file for a module. It has compile time dependency on a shared library, libavro to be precise. To that end, I downloaded, built and installed libavro-1.5.1.so.21. It got installed at /usr/local/lib by default. I also edited ld.so.conf to include /usr/local/lib. I executed ldconfig to regenerate ld cache. After the above steps, I generated the rpm for my module. When I try to install the rpm on the same machine I built it, I get failed dependency error:- libavro-1.5.4.so.22()(64bit) is needed by mymodule-1.1-1.x86

I don't understand why should it fail on a shared lib it linked to while building.

user434345
  • 299
  • 5
  • 8

2 Answers2

1

Try installing libavro-1.5.4 instead. rpm is looking for the logical name (soname) of the required libraries so that's why the installation fails.

lsimard
  • 26
  • 1
1

Having the shared library alone is not enough: you need the headers as well, and the .so link to be able to link against it.

Try and find a -devel package along with the library package and install it. Add the devel package as a BuildRequires in your spec file.

Oh, and DO NOT build your RPMs as root -- you don't do that, do you?

fge
  • 119,121
  • 33
  • 254
  • 329