• We did not send an email asking for donations - please read this post.

Install openssl fails

muhu

New Member
Joined
Oct 21, 2022
Messages
14
Reaction score
2
Credits
204
I am new to Linux (CentOS to be specific) so I probably miss something basic. I need to install openssl to compile some program so I used

sudo yum install openssl-devel

I get the output
---> Package openssl-devel.x86_64 1:1.0.2k-8.el7 will be installed
...
--> Finished Dependency Resolution
Error: Package: libselinux-devel-2.5-11.el7.x86_64 (C7.4.1708-base)
Requires: libselinux(x86-64) = 2.5-11.el7
Installed: libselinux-2.5-12.el7.x86_64 (@localrepo)
libselinux(x86-64) = 2.5-12.el7
Available: libselinux-2.2.2-6.el7.x86_64 (C7.0.1406-base)
libselinux(x86-64) = 2.2.2-6.el7
Available: libselinux-2.5-6.el7.x86_64 (C7.3.1611-base)
libselinux(x86-64) = 2.5-6.el7
Available: libselinux-2.5-11.el7.x86_64 (C7.4.1708-base)
libselinux(x86-64) = 2.5-11.el7
Error: Package: krb5-devel-1.15.1-8.el7.x86_64 (C7.4.1708-base)
Requires: krb5-libs(x86-64) = 1.15.1-8.el7
...

If I read this correctly, the openssl package depends on libselinux-devel-2.5-11.el7.x86_64 and that requires libselinux(x86-64) = 2.5-11.el7. However, I only have different versions available like libselinux-2.5-12.el7.x86_64, etc.

I believe that Linux is supposed to download all dependencies automatically. If so, why did this not work in this case and how can I fix it. If it doesn't download dependencies automatically then how would I go after installing specific versions of a package, i.e. what does the command look like?
 


dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,559
Reaction score
1,177
Credits
9,920
It's telling you that you already have a newer version installed.
libselinux 2.5.12 is installed. But libselinux 2.5.11 is available on your repo.

But to install a specific version.

yum clean all
yum --showduplicates list libselinux


That will list all the versions available to you.
Then just type out the version like this...

yum install libselinux-2.5.11.el7.x86_64 -y

Usually it will take care of all the dependencies for you. Unless you have a newer version than what is available on the internet.
You can also do..

yum downgrade libselinux-2.5.11.el7.x86_64 -y

To install an older version. Usually this will fix your dependencies if the new versions aren't available to you for some reason.

If you need to compile C code on Linux, you will likely need the development packages.

yum group list

yum group install "C Development Tools and Libraries"
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,559
Reaction score
1,177
Credits
9,920
As a side note. It is "usually" recommended to do a..

yum update -y

.. before installing a lot of packages with different versions.
This will sync up your libraries and applications to the latest versions of everything.
 
OP
M

muhu

New Member
Joined
Oct 21, 2022
Messages
14
Reaction score
2
Credits
204
I did a yum update -y and it updated a bunch of things. After that I did the "sudo yum install libselinux-2.5-11.el7.x86_64 -y" but it told me it is already installed and there isn't anything to do. Now in my first post it does show that this version is "Available" but I assume that just means it is on the system but not activated and the "yum install" activates/installs it. But then why would "yum install" not install it?

In any case, I then did try the "yum downgrade ..." but apparently there are other packages that require the new version, e.g. in my case libselinux-python-2.5-12.el7.x86_64. So how would I go after resolving this where different packages requires different versions?

[[email protected] ~]$ sudo yum install libselinux-2.5-11.el7.x86_64 -y
Package matching libselinux-2.5-11.el7.x86_64 already installed. Checking for update.
Nothing to do

[[email protected] ~]$ sudo yum downgrade libselinux-2.5-11.el7.x86_64 -y
Resolving Dependencies
--> Running transaction check
---> Package libselinux.x86_64 0:2.5-11.el7 will be a downgrade
---> Package libselinux.x86_64 0:2.5-12.el7 will be erased
--> Finished Dependency Resolution
Error: Package: libselinux-python-2.5-12.el7.x86_64 (@localrepo)
Requires: libselinux(x86-64) = 2.5-12.el7
Removing: libselinux-2.5-12.el7.x86_64 (@localrepo)
libselinux(x86-64) = 2.5-12.el7
Downgraded By: libselinux-2.5-11.el7.x86_64 (C7.4.1708-base)
libselinux(x86-64) = 2.5-11.el7
Available: libselinux-2.2.2-6.el7.x86_64 (C7.0.1406-base)
libselinux(x86-64) = 2.2.2-6.el7
Available: libselinux-2.5-6.el7.x86_64 (C7.3.1611-base)
libselinux(x86-64) = 2.5-6.el7
Error: Package: libselinux-utils-2.5-12.el7.x86_64 (@localrepo)
Requires: libselinux(x86-64) = 2.5-12.el7
Removing: libselinux-2.5-12.el7.x86_64 (@localrepo)
libselinux(x86-64) = 2.5-12.el7
Downgraded By: libselinux-2.5-11.el7.x86_64 (C7.4.1708-base)
libselinux(x86-64) = 2.5-11.el7
Available: libselinux-2.2.2-6.el7.x86_64 (C7.0.1406-base)
libselinux(x86-64) = 2.2.2-6.el7
Available: libselinux-2.5-6.el7.x86_64 (C7.3.1611-base)
libselinux(x86-64) = 2.5-6.el7
Error: Package: libsemanage-2.5-11.el7.x86_64 (@localrepo)
Requires: libselinux >= 2.5-12
Removing: libselinux-2.5-12.el7.x86_64 (@localrepo)
libselinux = 2.5-12.el7
Downgraded By: libselinux-2.5-11.el7.x86_64 (C7.4.1708-base)
libselinux = 2.5-11.el7
Available: libselinux-2.2.2-6.el7.i686 (C7.0.1406-base)
libselinux = 2.2.2-6.el7
Available: libselinux-2.5-6.el7.i686 (C7.3.1611-base)
libselinux = 2.5-6.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Staff online


Top