configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config [root@VM-8-10-centos zabbix-6.0.28]# yum install -y net-snmp-devel Repository extras is listed more than once in the configuration Repository epel is listed more than once in the configuration CentOS Stream 8 - Extras common packages 0.0 B/s | 0 B 00:01 Errors during downloading metadata for repository ‘extras-common’:
CentOS Stream 8 安装 net-snmp-devel 时遇到了网络连接和镜像源的问题
ping mirrorlist.centos.org
如果无法连接,请检查网络配置或更换网络环境。
/etc/yum.repos.d/CentOS-Base.repo
文件,将镜像源替换为国内的镜像源。例如,可以使用清华大学的镜像源:sudo sed -i 's|mirrorlist=http://mirrorlist.centos.org|#mirrorlist=http://mirrorlist.centos.org|' /etc/yum.repos.d/CentOS-Base.repo
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|' /etc/yum.repos.d/CentOS-Base.repo
net-snmp-devel
: 在更换镜像源后,尝试重新安装 net-snmp-devel
:sudo yum install -y net-snmp-devel
yum
安装,可以尝试手动下载 net-snmp-devel
的 RPM 包,并使用 rpm
命令安装。rpm.pbone.net
或 rpmfind.net
等网站来搜索和下载 net-snmp-devel
的 RPM 包。确保下载的包与你的系统版本兼容。wget
或 curl
命令下载 RPM 包。例如:wget http://rpm.pbone.net/package/net-snmp-devel/5.7.2-28.el7/x86_64/net-snmp-devel-5.7.2-28.el7.x86_64.rpm
rpm
命令进行安装。例如:sudo rpm -ivh net-snmp-devel-5.7.2-28.el7.x86_64.rpm
snmpwalk -v 1 127.0.0.1 -c public system
如果没有报错,说明安装成功。
问题 解决!
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。