yum安装软件失败

centos运行yum报错解决办法

问题

使用yum安装软件时,报错:

1
2
3
4
5
6
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 130 M RSS (1.0 GB VSZ)
Started: Wed Apr 4 10:44:50 2018 - 04:01 ago
State : Sleeping, pid: 11199

解决

该问题可能是由于系统目前处于自动升级状态,所以锁定了yum,只要强制关闭yum进程即可重新运行yum

1
rm -rf /var/run/yum.pid

优质yum源

Remi repository 是包含最新版本 PHP 和 MySQL 包的 Linux 源,由 Remi 提供维护。有个这个源之后,使用 YUM 安装或更新 PHP、MySQL、phpMyAdmin 等服务器相关程序的时候就非常方便了。

1
2
3
4
5
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
# for RHEL only
subscription-manager repos --enable=rhel-7-server-optional-rpms

参考文章

文章目录
  1. 问题
  2. 解决
  3. 优质yum源
|