2

I am trying to rum my rpm package but getting this dependencies error.

[root@localhost ~]# rpm -ivh /root/x86_64/asterisk-1.8.12.2-1.fc15.x86_64.rpm 
error: Failed dependencies:
        libc.so.6(GLIBC_2.14)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libc.so.6(GLIBC_2.7)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libc.so.6(GLIBC_2.8)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libcap.so.2()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libcrypto.so.10()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libedit.so.0()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libgsm.so.1()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libpopt.so.0(LIBPOPT_0)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libresample.so.1()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libspeexdsp.so.1()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libsrtp.so.0()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libssl.so.10()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libtinfo.so.5()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libxml2.so.2(LIBXML2_2.4.30)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        libxml2.so.2(LIBXML2_2.6.0)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64
        rpmlib(FileDigests) <= 4.6.0-1 is needed by asterisk-1.8.12.2-1.fc15.x86_64
        rpmlib(PayloadIsXz) <= 5.2-1 is needed by asterisk-1.8.12.2-1.fc15.x86_64

To resolve the dependency error i used following command.

[root@localhost ~]# yum-builddep asterisk-1.8.12.2-1.fc15.src.rpm 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hns.net.in
 * extras: mirrors.hns.net.in
 * updates: mirrors.hns.net.in
Checking for new repos for mirrors
autoconf-2.59-12.noarch
automake-1.9.6-2.3.el5.noarch
openssl-devel-0.9.8e-22.el5_8.4.x86_64
newt-devel-0.52.2-15.el5.x86_64
ncurses-devel-5.5-24.20060715.x86_64
libcap-devel-1.10-26.x86_64
gtk2-devel-2.10.4-21.el5_7.7.x86_64
Error: No Package found for libsrtp-devel

I am using CentOS 5.6 which is installed in VirtualBox on Fedora-15.

1 Answer 1

3

The yum-buliddep command installs dependencies for building a package from source, not installing it. If you use yum to install the RPM, it will install dependencies from remote sources if the packages are available.

yum install /root/x86_64/asterisk-1.8.12.2-1.fc15.x86_64.rpm

On older versions of yum, you may need to use localinstall for a local file:

yum localinstall /root/x86_64/asterisk-1.8.12.2-1.fc15.x86_64.rpm
7
  • Thanks for making it clear, rpm which is created in Fedora will it work in CentOS as well?
    – Juned
    Commented Nov 6, 2012 at 7:22
  • @juned In some cases it will, but in most cases, it won't. It is likely that it will be linked against library versions that are not available in CentOS.
    – jordanm
    Commented Nov 6, 2012 at 7:23
  • that means better idea is to create separate rpm's for different OS's
    – Juned
    Commented Nov 6, 2012 at 7:25
  • @juned Yes, you can develop and test the spec files on any system you want, but it should always be built on the OS that you are targeting. There is a reason the version number in the RPM contains "fc15". If the OS you are targeting lacks dependencies to build, it will also lack dependencies to install.
    – jordanm
    Commented Nov 6, 2012 at 7:26
  • Thanks a lot,my last question is if i know particular rpm needs a specific dependencies so cant i package that dependencies with main rpm file? so while running a single rpm -ivh foo.rpm command package as well as dependencies will get install. is it possible?
    – Juned
    Commented Nov 6, 2012 at 7:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .