Linux can';t在不访问internet的情况下使用yum安装httpd-devel-rpm

Linux can';t在不访问internet的情况下使用yum安装httpd-devel-rpm,linux,centos,rpm,centos6,yum,Linux,Centos,Rpm,Centos6,Yum,我尝试在没有internet访问的情况下使用yum安装httpd-devel-rpm包。 我在其他coumptuer上使用了yum的--downloadonly选项下载了dependencies rpm包, 然后我将我下载的rpm包移动到我想要安装的机器上 这是centos 6.8发行版 我希望目前安装。但是机器显示错误信息如下 运行 yum install -y httpd-devel-2.2.15-69.el6.centos.x86_64.rpm 给出此输出: Loaded plugin

我尝试在没有internet访问的情况下使用yum安装httpd-devel-rpm包。 我在其他coumptuer上使用了yum的--downloadonly选项下载了dependencies rpm包, 然后我将我下载的rpm包移动到我想要安装的机器上

这是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

yum
尝试刷新其存储库,如果没有internet,这些存储库将无法工作。我看到两种解决办法:

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