centos7启动yum 安装失败原因(个人观点如有错误请指正)

发布时间:2026/5/23 21:14:14

centos7启动yum 安装失败原因(个人观点如有错误请指正) 第一步修复 DNS最关键bash运行echo nameserver 8.8.8.8 /etc/resolv.confecho nameserver 114.114.114.114 /etc/resolv.conf第二步下载阿里云 CentOS7 国内源bash运行curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo第三步清理并生成新缓存bash运行yum clean allyum makecache第四步现在再装 epel-releasebash运行yum install -y epel-release. # 关闭防火墙和SELinux测试环境专用生产环境需单独配置systemctl stop firewalldsystemctl disable firewalldsetenforce 0sed -i s/SELINUXenforcing/SELINUXdisabled/g /etc/selinux/configyum install -y net-tools vim wget lrzsz unzip zip git htop ntpdate telnet tree dos2unix包含的所有必备工具net-toolsifconfig、netstat 网络命令vim编辑器wget下载工具lrzszrz/sz 上传下载unzip/zip解压压缩git代码工具htop系统监控ntpdate时间同步telnet端口测试tree目录树查看dos2unix格式转换1. --enable-agent2删除原因Go 编写和你的 OpenSSL 1.1.1 冲突100% 编译失败2. --with-mysql-includes3. --with-mysql-libs删除原因你现在用 yum 安装的 MySQL不需要手动指定路径写了反而报错4. --with-ssh2删除原因依赖系统旧 OpenSSL和你安装的 1.1.1 冲突5. --with-libpthread删除原因系统自带重复、多余6. --with-libevent-include --with-libevent-lib删除原因--with-libevent 已经包含路径重复多余会导致冲突

相关新闻