一、## 软件仓库配置,以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