【问题标题】:Add centos repository to Amazon Linux instance将 centos 存储库添加到 Amazon Linux 实例
【发布时间】:2020-09-28 13:33:08
【问题描述】:

我正在尝试将以下 yum 存储库添加到我的 AWS 实例:

https://centos.pkgs.org/7/centos-x86_64/

问题是此源中没有包含所需元数据的 repodata/ 目录,如何添加此存储库而不会出现以下错误:

yum-config-manager --add-repo https://centos.pkgs.org/7/centos-x86_64/
yum install -y katello
https://centos.pkgs.org/7/centos-x86_64/repodata/repomd.xml: [Errno 12] Timeout on 
https://centos.pkgs.org/7/centos-x86_64/repodata/repomd.xml: (28, 'Connection timed out 
after 5001 milliseconds')

我目前缺少多个依赖项,例如 python-rhsm 和 selinux-policy,它们都只存在于 centos.pkgs 存储库中。

【问题讨论】:

    标签: amazon-web-services amazon-ec2 foreman


    【解决方案1】:

    您的网址错误,以下对我有用:

    RUN curl http://mirror.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 -o RPM-GPG-KEY-CentOS-7
    RUN rpm --import RPM-GPG-KEY-CentOS-7
    RUN yum-config-manager --add-repo='http://mirror.centos.org/centos/7/os/x86_64/'
    

    请注意,他们的很多软件包会与亚马逊预装的软件包发生冲突。

    我发现的一种解决方法是添加该存储库,而是在我的所有安装中使用yum install <direct_rpm_link>。我不得不通过添加更多的 .rpm 链接自己手动解决一些依赖关系,但至少它最终工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-21
      • 1970-01-01
      • 2015-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-12
      相关资源
      最近更新 更多