1

I tried installing the following package:

[root@localhost ~]# rpm -i libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm 

But I got an error for failed dependencies:

[root@localhost ~]# rpm -i libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm error: Failed dependencies: libgnutls.so.28()(64bit) is needed by libmicrohttpd-0.9.22-1.el7.centos.x86_64 libgnutls.so.28(GNUTLS_1_4)(64bit) is needed by libmicrohttpd-0.9.22-1.el7.centos.x86_64 

Naturally I tried installing these dependencies:

[root@localhost ~]# yum install libgnutls.so.28 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.vooservers.com * epel: pkg.adfinis-sygroup.ch * extras: mirrors.melbourne.co.uk * updates: mirrors.melbourne.co.uk Package gnutls-3.3.26-9.el7.i686 already installed and latest version Nothing to do 

But as you can see above I am told that the package is "already installed" and there is "nothing to do".

This makes no sense to me if the package is already installed then why is the installation of libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm failing because it can not find this dependency?

3 Answers 3

2

You have installed gnutls-3.3.26-9.el7.i686, but that is not libgnutls.so.28()(64bit), it is 32bits.

You need to install gnutls-3.3.26-9.el7.x64_86, which is the correct architecture to match what you're trying to install.

1

Try this,

You were installing i686 which is a 32-bit library.The error clearly states that libmicrohttpd needs a 64-bit library.

Refer this link to get the required RPM.

You can also configure yum via /etc/yum.conf to install the best suited package for the underlying architecture. The parameter to be modified in yum.conf is multilib_policy.

multilib_policy Can be set to 'all' or 'best'. multilib_policy=all 

All means install all possible arches for any package you want to install. Therefore yum install foo will install foo.i386 and foo.x86_64 on x86_64, if it is available. Best means install the best arch for this platform, only. For more refer this page and this answer.

To know the underlying archietcture , run uname -m

2
  • I'm not savvy when it comes to arch types, did not know that i686 was 32-bit. Thank you. Commented Sep 28, 2018 at 9:52
  • @MarkMark added a command to know the underlying architecture of your system. Commented Sep 28, 2018 at 9:57
0

it is always a better idea to use yum directly in order to let yum manage the dependencies for you:

yum install libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm 
5
  • Relative path need not be specified for yum like ./ Commented Sep 28, 2018 at 10:40
  • all-right, I changed that. But it does no harm. Commented Sep 28, 2018 at 10:42
  • No, It harms actually, the yum actually searches for the package named ./libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm instead of libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm if ./ is specified and eventually fails saying No package ./libmicrohttpd-0.9.22-1.el7.centos.x86_64.rpm available. Commented Sep 28, 2018 at 10:43
  • @saisasanka: the user is trying to install a package file, otherwise rpm -i wouldn't even bother. That is why in this case using the relative path would not change anything. You are right that it would fail if you would like yum to search for the package in its repositories. Commented Sep 28, 2018 at 10:46
  • ok. My thought was, since you mentioned yum, the OP need not even get the specific RPM manually to install via yum and so I suggested the edit. :) Commented Sep 28, 2018 at 10:49

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.