Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

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

To resolve the dependency error i used following command.

[root@localhost ~]# yum-builddep asterisk- 
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
Error: No Package found for libsrtp-devel

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

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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-

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

yum localinstall /root/x86_64/asterisk-
share|improve this answer
Thanks for making it clear, rpm which is created in Fedora will it work in CentOS as well? –  juned Nov 6 '12 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 Nov 6 '12 at 7:23
that means better idea is to create separate rpm's for different OS's –  juned Nov 6 '12 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 Nov 6 '12 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 Nov 6 '12 at 7:33
show 2 more comments

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.