yum安装时出现Loaded plugins: fastestmirror
fastestmirror是yum的一个加速插件,这里是插件提示信息是插件不能用了。
vim /etc/yum/pluginconf.d/fastestmirror.confenabled = 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
本文档详细介绍了如何解决yum安装时fastestmirror插件失效的问题,包括修改配置文件禁用插件和重建yum源。此外,还提供了处理Nginx安装过程中遇到的各种错误的方法,如依赖缺失,以及直接通过yum安装避免手动编译的步骤。同时,针对手动安装时的zlib库缺失问题,给出了安装相关开发库的解决方案。
778

被折叠的 条评论
为什么被折叠?



