yum install only displays "Loaded plugins: fastestmirror, langpacks" then exits the installation

Viewed 26

When I execute a command to install a package, all that I get is the following message: “Loaded plugins: fastestmirror, langpacks”. Then the installation is exited, and I see a command prompt. For example, I want to install the libgit2-devel package, and so I execute the following line: sudo yum -disablerepo=”*” –enablerepo=R-packages install libgit2-devel.

Before that, I put all the .rpm files in a folder: “/R/linux”. Then I created a repository with the following command: createrepo --database /R/linux. Then I created a repo file: “/etc/yum.repos.d/R-packages.repo”. The repo file I created looked as follows:

[R-packages]
name= R-packages
baseurl=file:///R/linux
enabled=1
gpgcheck=0

Once I did that, package installations were going just fine. One of the packages I installed was devtoolset-11, because updated C++ compilers are needed to install some R packages. I then enabled devtoolset-11 by executing the following command: scl enable devtoolset-11 bash. The installations stopped working after this point. But even after I disabled devtoolset-11 (scl disable devtoolset-11 bash), the installations still wouldn’t work.

There are some other posts about getting hung up after the “Loaded plugins: fastestmirror, langpacks” message. I should be clear that I am seeing that message followed quickly by another command line prompt. There is no hanging.

I'm working on the following system, which is offline/air-gapped: "CentOS Linux release 7.8.2003 (Core)"

There are suggestions in some forums that involve removing files, etc., and I’m hesitant to do any of that. As my knowledge of Linux systems is very limited, I want to make sure I don’t do something to really mess up the system, if I haven’t done so already. Any troubleshooting advice, however, is appreciated.

Also, here's what I see when executing code with the --verbose option.

$ sudo yum --verbose disablerepo="*" –enablerepo=R-packages install libgit2-devel
Loading "fastestmirror" plugin
Loading "langpacks" plugin
Adding en_US.UTF-8 to language list
Config time 0.011
Yum version: 3.4.3
$ 
1 Answers

It turns out that I need to be "root". So, how do you become root? Execute the following code at the command prompt: sudo su. Once you do this, you'll see something change at the command prompt, like the following: [root@system-name user-name]#.

After becoming root, you don't need the sudo prefix anymore to do installations:

yum --verbose disablerepo="*" –enablerepo=R-packages install libgit2-devel

One more thing, scl enable appears to be quite temporary. A better solution is to add the path of updated compilers to the .bash_profile. In my case, I made the following edit with nano .bash_profile:

PATH=/opt/rh/devtoolset-11/root/bin:$PATH

export PATH

Then execute the change with source .bash_profile and check the change with gcc --version.

Related