How to fix yum errors on CentOS, RHEL or Fedora

Yum is a package management tool for installing, updating and removing rpm packages on RedHat-based systems. When you try to install a package withyum command, you may encounter
errors for various reasons. In this post, I will describe under what situationsyum errors can occur, and explain
how to fix yum errors.

Fix 404 errors

Symptom: When you try to install a package with yum,yum complains that the URLs for repositories are not found, and throws 404 errors, as shown below.

Loaded plugins: fastestmirror
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.4 MB     00:09
extras                                                   | 3.5 kB     00:00
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404
Not Found"
Trying other mirror.
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404
Not Found"
Trying other mirror.

You can get these 404 errors when the metadata downloaded by yum has become obsolete.

To repair yum 404 errors, clean yum metadata as follows.

$ sudo yum clean metadata

Or you can clear the whole yum cache:

$ sudo yum clean all

Fix connection failure errors

Symptom: You get "network is unreachable" or "couldn‘t connect to host" errors while runningyum command.

Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist error was
14: PYCURL ERROR 7 - "Failed to connect to
2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
Error: Cannot find a valid baseurl for repo: base
[Errno 14] PYCURL ERROR 7 - "couldn‘t connect to host"
Trying other mirror.
[Errno 14] PYCURL ERROR 7 - "couldn‘t connect to host"
Trying other mirror.
[Errno 14] PYCURL ERROR 7 - "couldn‘t connect to host"
Trying other mirror.

The error means that you cannot properly connect to repository servers for some reason. If you can still ping the servers without any problem, check if your system is behind a proxy. If you are runningyum behind a proxy, but have not specified the
proxy in the yum configuration, you will get connection failure errors like the above.

To configure a proxy in the yum configuration:

$ sudo vi /etc/yum.conf


Fix metadata checksum errors

Symptom: You get "Metadata file does not match checksum" while runningyum command.

epel/pkgtags                                             | 466 kB     00:14 [Errno -1] Metadata file does not match checksum
Trying other mirror.

You can get the metadata checksum errors when the metadata downloaded by yum has become outdated.

To repair yum checksum errors, clean yum metadata:

$ sudo yum clean metadata

Fix yum lock errors

Symptom: When you run yum on Fedora, you get the errors saying that "Another app is currently holding the yum lock."

Loaded plugins: langpacks, presto, refresh-packagekit
Existing lock /var/run/ another copy is running as pid 1880.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory : 178 M RSS (586 MB VSZ)
    Started: Tue Jul  9 09:43:17 2013 - 00:12 ago
    State  : Sleeping, pid: 1880

The culprit for this error is PackageKit which is responsible for auto updates on Fedora. ThePackageKit process gets automatically started upon boot, holding the
yum lock.

To fix the error, disable auto update checks on Fedora. In order to do so, click on "Software" on Fedora desktop to open software update preferences.

Then click on "Software Sources" menu like the following.

In the software update preferences, set "Never" for "Check for updates".

Once you reboot your desktop, you will no longer get yum lock errors.

时间: 05-18

How to fix yum errors on CentOS, RHEL or Fedora的相关文章

PHP 5.4 on CentOS/RHEL 7.0, 6.5 and 5.10 via Yum

PHP 5.4.36 has been released on on 18th December 2014, and is also available for CentOS/RHEL 5.10 and 6.5 at Webtatic via Yum. Update 2013-07-21 – A new package “php54w-mysqlnd” has been added as an alternative to “php54w-mysql”. This will in

Install MySQL 5.7 on Fedora 25/24, CentOS/RHEL 7.3/6.8/5.11

1. Change root user Bash su - ## OR ## sudo -i 2. Install MySQL YUM repository Fedora Bash ## Fedora 25 ## dnf install ## Fedora 24 ## dnf install

CentOS/RHEL Linux安装EPEL第三方软件源

EPEL(Extra Packages for Enterprise Linux) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS等提供高质量软件包的项目.装上了EPEL,就像在 Fedora 上一样,可以通过 yum install 软件包名,即可安装很多以前需要编译安装的软件.常用的软件或一些比较流行的软件,比如现在流行的nginx, openvpn等等,都可以使用EPEL很方便的安装更新. 安装EPEL源 更新: 目前可以直接通过执行命令: yum install


Linux内核版本 Linux内核版本分为主线.稳定和长期版本.(所有内核版本都可以在内核开发官方网站https://www.kernel.org上获取)目前我们看到最新的稳定内核版本为4.10.12. 主线版本代表整个Linux内核的一个树干,新的主线版本每2-3个月发布一次,所有的新功能及特性都将会包含主线版本中.稳定内核则是在主线版本中,被认为是"稳定的"得出.稳定内核的任何错误修复都将从主线树中返回,也就是主线内核出现的任何错误(包括之前的任何旧版本内核的错误和BUG)在得到修

Install Adobe Flash Player 11.2 on CentOS/RHEL 7/6/5, Fedora 20/19

Adobe Flash Player are very useful for watching videos in web browser online. Without flash player most of the videos will not play in your browser. This article will help you to install Adobe flash player plugin for your browsers in CentOS 6/5, Redh

Install Oracle Java JDK/JRE 7u55 on Fedora 20/19, CentOS/RHEL 6.5/5.10

What's new in Sun/Oracle Java 7 VM Compressed 64-bit object pointers Garbage-First GC (G1) JSR 292: VM support for non-Java languages (InvokeDynamic) Lang JSR 294: Language and VM support for modular programming JSR 308: Annotations on Java types JSR

在 CentOS 7.x / Fedora 21 上面体验 PHP 7.0

编译自:作者: Aun Raza原创:LCTT译者: wi-cuckoo转载地址: PHP7 为了改善执行效率与内存占用,新的版本添加了PHPNG功能. 引入了JIT引擎来动态编译Zend操作码为自然机器码,以此来达到更快

在CentOS/RHEL 6.2上使用YUM安装PHP5.4

核心命令 rpm -Uvh    yum install php54w 以下转自样例: php5.4于2012年5月8号发布,从php5.4.0开始php加入了一些新特色如: Traits支持 内置了一个简单的Web服务器 提供了数组简短语法 直接对函数返回值进行数组取值 最终删除魔术方法及安全模式 你可以在这里看到更新日志. 这里使用 Webtatic EL6的YUM源来安装php5.4,我们首页安装Web

Setup FTP Server step by step in CentOS / RHEL / Scientific Linux 6.3/6.4/6.5 This tutorial shows you how to install and configure FTP server in CentOS 6.5. Though the steps provided here are tested in CentOS 6