The editor of this article will introduce in detail how to solve the problem that the yum command cannot be used in Linux. The content is detailed, the steps are clear, and the details are handled properly. The idea of editing is slowly deepening, let's learn new knowledge together.
Solution: 1. Install the Centos image for linux redhat, and use the mv repo file to replace $releasever in the repo file; 2. Clear all caches, and Use yum makecache to get the yum list; 3. Use yum -y install gcc to install gcc.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
[root@localhost ~]# yum -y install gccLoaded plugins: katello, product-id, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Install Process No package gcc available. Nothing to do
For those who are accustomed to using CentOS, it is a kind of torture not to be able to use this command
Solution process:< p>1. Install Centos image for linux redhat
Modify the repo file
[root@localhost~]# mv CentOS6 -Base-163.repo /etc/yum.repos.d/
*** Replace $releasever with 6
[root@localhost yum.repos.d]# sed -i 's#$releasever#6#g' ./CentOS6-Base-163.repo
2. Clear all caches
[root@ localhost yum.repos.d]#yum clean all Loaded plugins: katello, product-id, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Cleaning up Everything
Get yum list
3. Search and install< p>Install gcc
[root@localhost yum.repos.d]# yum -y install gcc
At this point, gcc installation is complete, and you can also use yum for other compilation environments installed.
After reading this, the article on how to solve the yum command in linux has been introduced. If you want to master the knowledge points of this article, you need to practice it yourself before you can understand it. If you want to know more For more related articles, welcome to pay attention to Yisu Cloud Industry Information Channel.
Copyright Description：No reproduction without permission。
Knowledge sharing community for developers。
Let more developers benefit from it。
Help developers share knowledge through the Internet。