yum安装时出现Loaded plugins: fastestmirror
fastestmirror是yum的一个加速插件,这里是插件提示信息是插件不能用了。
vim /etc/yum/pluginconf.d/fastestmirror.conf
enabled = 1修改为enabled = 0vim /etc/yum.conf
修改为plugins=0 不使用插件- 清除缓存并重新构建yum 源
yum clean all yum clean dbcache yum makecache
yum命令报错File contains no section headers
安装yum源
cd /etc/yum.repos.d
进入目录rm -rf ./*
删除所有文件- 下载镜像
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
yum -y clean all
删除缓存yum -y makecache
建立缓存
如果建立缓存失败Error: Failed to download metadata for repo 'base'
:
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
下载具体镜像yum makecache
重新建立
安装nginx各种报错
直接yum -y install nginx
不用再wget
nginx tar包去解压编译,yum install 会自动安装依赖.
手动安装nginx报错
1. ./configure: error: the HTTP gzip module requires the zlib library.
yum -y install pcre-devel
yum -y install openssl openssl-devel
yum install -y zlib-devel