【问题标题】:can't install httpd-devel rpm by using yum without internet access无法在没有 Internet 访问的情况下使用 yum 安装 httpd-devel rpm
【发布时间】:2019-10-03 07:07:47
【问题描述】:

我尝试在没有互联网访问的情况下使用 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

【问题讨论】:

    标签: linux centos rpm centos6 yum


    【解决方案1】:

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-08
      • 2016-01-01
      • 2019-12-21
      • 1970-01-01
      • 2020-10-20
      • 2019-05-09
      • 1970-01-01
      • 2012-12-12
      相关资源
      最近更新 更多