Installing software "without" root on Enhanced SELinux profile [Errno 13] Permission denied: '/bin/rpmkeys'

Posted on

I've installed RHEL 9.1 on a laptop for a first time, with Enhanced SELinux profile and did not
create root user during installation.

When trying to install php

sudo dnf module install php:8.1/devel

Got an error

[Errno 13] Permission denied: '/bin/rpmkeys'

And a bit of research pointed that it is probably related to Enhanced SELinux profile. Suggestion was that I shall use root user for installation as 'sudo administrator' is not as powerful.

However since I did not enable root user during installation

sudo su -
su -
sudo passwd root

were not the options to proceed.
After unsuccessful searching for how to enable root user on RHEL I figured that it's probably just a password that needs to be set.
I recalled one time I forgot root password on Fedora so did that as explained here:

https://docs.fedoraproject.org/en-US/quick-docs/reset-root-password/

su - 

is now an option and I finally installed php.

$ php -v
PHP 8.1.8 (cli) (built: Jul  5 2022 21:55:55) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.8, Copyright (c) Zend Technologies

Responses