我尝试通过使用yum来安装httpd-devel rpm软件包,而无法访问互联网。 我通过使用其他合作伙伴的yum的--downloadonly选项下载了rpm依赖包, 然后将rpm软件包移到我要安装httpd_devel的计算机上。
这是centos 6.8发行版本。
我希望当前安装。但机器显示以下错误消息。
运行
yum install -y httpd-devel-2.2.15-69.el6.centos.x86_64.rpm
提供以下输出:
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Examining httpd-devel-2.2.15-69.el6.centos.x86_64.rpm: httpd-devel-2.2.15-69.el6.centos.x86_64
Marking httpd-devel-2.2.15-69.el6.centos.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
答案 0 :(得分:0)
yum
尝试刷新其存储库,如果没有互联网,该存储库将无法工作。我看到了两种解决方案:
1)告诉yum
不要查看其任何已配置的存储库:
yum --disablerepo="*" install -y httpd-devel-2.2.15-69.el6.centos.x86_64.rpm
2)直接使用rpm
;不要使用yum
:
rpm -Ivh httpd-devel-2.2.15-69.el6.centos.x86_64.rpm