一、## 軟件倉庫配置,以centos為例
# cat /etc/yum.repos.d/CentOS-Base.repo [base] name=Base baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/ enabled=1
gpgcheck=0 [epel] name=epel baseurl=https://mirrors.aliyun.com/epel/7/x86_64/ enabled=1
gpgcheck=0
二、 CentOS7更新阿里yum源
1、下載阿里yum源:
wget http://mirrors.aliyun.com/repo/Centos-7.repo
2、備份並替換yum源文件:
cp Centos-7.repo /etc/yum.repos.d/ cd /etc/yum.repos.d/ mv CentOS-Base.repo CentOS-Base.repo.bak mv Centos-7.repo CentOS-Base.repo (區分大小寫)
3、執行yum源更新操作:
yum clean all yum makecache yum update
三、查看yum安裝軟件的路徑:
(以wget為例)
1、安裝wget:yum install wget
2、查找wget安裝包:rpm -qa |grep wget
3、查找安裝包的安裝路徑:rpm -q
四、修改yum默認安裝路徑:
重啟生效
五、yum錯誤解決方案:
1. wget https://mirrors.aliyun.com/centos-vault/7.4.1708/os/x86_64/Packages/nspr-4.13.1-1.0.el7_3.x86_64.rpm
2. rpm2cpio nspr-4.13.1-1.0.el7_3.x86_64.rpm | cpio -idmv
3. 然后將解開的文件拷貝覆蓋到 / 下
當出現:
Loaded plugins: fastestmirror, security Existing lock /var/run/yum.pid: another copy is running as pid 4733. Another app is currently holding the yum lock; waiting for it to exit.。。 The other application is: yum-updatesd-he Memory : 22 M RSS (249 MB VSZ) Started: Fri Jul 6 12:18:29 2012 - 53:47 ago State : Sleeping, pid: 4733
關機重啟后也沒有解決,然后嘗試刪除yum.pid文件,並重啟yum服務后正常,具體命令如下:2
rm -rf /var/run/yum.pid
/sbin/service yum-updatesd restart
上面就是Linux yum出現Loaded plugins錯誤的解決方法的相關介紹了,如果你在關機重啟后還是無法解決,可刪除yum.pid文件即可解決
當yum出現:
Centos使用yum安裝時提示Loaded plugins: fastestmirror
解決辦法: 修改插件配置文件 vi /etc/yum/pluginconf.d/fastestmirror.conf 第2行改為: enabled=0 //由 1 改成0 ,禁用該插件 修改yum 配置文件 vi /etc/yum.conf 第9行改為: plugins=0 //不使用插件 清除緩存並重新構建yum 源 yum clean all yum makecache
yum使用命令: https://cloud.tencent.com/developer/article/1527027
linux本地yum源制造:https://cloud.tencent.com/developer/article/1109445