•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Backup
    • Content Delivery Network
    • Colocation Hosting
    • Dedicated Hosting
    • DDoS Mitigation
    • IP Transit
    • Private Cloud
    • Wavelength
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • Dedicated Servers
    • Colocation
    • Private Cloud
    • DDos Protection
    • IP Transit
    • CDN
    • Backup
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Yum Update Not Working on Centos 7

Trusted By
25,000+ Customers (Since 2001)
  • Home
  • Client
  • Knowledgebase
  • Linux
  • Centos 7
  • Yum Update Not Working on Centos 7

Table Of Content

Related Articles

  • How to configure IP's On Centos 7?
  • Installing MariaDB on Centos 7
  • How to install the GCC compiler in CentOS 7?
  • How to Install SSL Certificate On Centos 7
  • Linux Command Line Tutorial For Git
  • How To Install Git On Centos 7
  • Installation of Lamp Stack on CentOS 7
  • Views: (30207)
  • Votes: (-24)
Was this article helpful?
VOTE

Yum Update Not Working on Centos 7

Publisher: Psychz Networks,  January 23,2019

It seems that the 'yum update' is causing some issue when you try to run an update. The YUM allows you to easily install, update, remove or search software packages on a system.

At this point, the yum update must be failing for many reasons and to identify the issue it is important to have the error message for reference.

Some of the most common error messages are 

One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail.

Or

There are no enabled Yum repositories. Installation is not possible.


Reason

It is highly like that the standard CentOS repository files are missing in the /etc/yum.repos.d/ directory. The easiest way to fix these repositories is to reinstall centos release packages. In the following given steps, we will attempt to do so on a CentOS 7.

Note: Following steps will work on CentOS 6 or CentOS 7

 

Step 1

Connect to your server as root via SSH

Step 2

We will remove existing centos-release

# rpm -e centos-release --nodeps

Info: The --nodeps option allows RPM to continue installing despite the fact that you are missing a handful of packages that $package depends on. Using it with rpm -e command, the package will be erased without giving you warning, even if some other packages are dependent on the package you are trying to erase.

Step 3

Download the necessary package from CentOS 7 Repository http://mirror.centos.org/centos/7/os/x86_64/Packages/


Tip: You can use your browser search option (Ctrl + f) and type 'centos-release'  to locate the file to download.

Step 4

Install the package. You can do this either by directly accessing the file from CentOS repository

# rpm -Uvh http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-5.1804.el7.centos.x86_64.rpm

Or

If you have downloaded the file on your local system, you need to run following

# rpm -Uvh /home/user/Downloads/centos-release-7-5.1804.el7.centos.x86_64.rpm

Info
v - verbose (using or expressed in more words
than are needed)
h - hash (Print 50 hash marks as the package archive is unpacked)
U(caps) - upgrade (This upgrades or installs the package currently installed to a newer version. This is the same as install, except all
other version(s) of the package are removed after the new package is installed)


This should update the repository and files, and fix the problem. You can now run the command that you were trying to earlier and give it a shot.

Hosting Services
  • Dedicated Hosting
  • Colocation Hosting
  • Backup
  • IP Transit
  • DDoS Mitigation
Support
  • Portal Login
  • Knowledgebase
  • Community
Company
  • About Us
  • Contact Us
  • Network
  • Data Centers
  • Looking Glass
  • Affiliates
  • Reseller
  • Blog
Policies
  • Privacy Policy
  • Acceptable Usage Policy
  • Terms and Conditions
  • Service Level Agreement
Company
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801
Subscribe to Our Mailing List
* indicates required
Copyright © 2022 Psychz Networks, A Profuse Solutions Inc Company