首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在SLES 12.5上运行“`zypper刷新”

无法在SLES 12.5上运行“`zypper刷新”
EN

Unix & Linux用户
提问于 2021-03-23 14:44:19
回答 1查看 992关注 0票数 0

我试图安装在SLES 12.5上的码头。我试着遵循这就是答案上的说明。

初始尝试

代码语言:javascript
复制
# zypper addrepo https://download.opensuse.org/repositories/Virtualization:containers/SLE_12_SP5/Virtualization:containers.repo
Adding repository 'Virtualization:containers (SLE_12_SP5)' ...........................................................................................................[done]
Repository 'Virtualization:containers (SLE_12_SP5)' successfully added

URI         : https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/
Enabled     : Yes
GPG Check   : Yes
Autorefresh : No
Priority    : 99 (default priority)

Repository priorities are without effect. All enabled repositories share the same priority.
代码语言:javascript
复制
# zypper refresh
Repository 'SLES12-SP5-Pool' is up to date.
Repository 'SLES12-SP5-Updates' is up to date.
Repository 'Update' is up to date.
Retrieving repository 'Virtualization:containers (SLE_12_SP5)' metadata -------------------------------------------------------------------------------------------------[-]
Download (curl) error for 'https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/repodata/a02bda6c6525d5d550e34e98844bf0e18a66aa1a24282c72a80c4679ef2e121d-primary.xml.gz':
Error code:  Bad URL
Error message: Redirect to protocol "http" not supported or disabled in libcurl

Abort, retry, ignore? [a/r/i/...? shows all options] (a): a
Retrieving repository 'Virtualization:containers (SLE_12_SP5)' metadata .............................................................................................[error]
Repository 'Virtualization:containers (SLE_12_SP5)' is invalid.
[Virtualization_containers|https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'Virtualization:containers (SLE_12_SP5)' because of the above error.
Some of the repositories have not been refreshed because of an error.

第二次尝试

我发现关于Unix & Linux的这个问题有类似的错误,所以我编辑了/etc/zypp/repos.d/Virtualization_containers.repo文件如下:

以前:

代码语言:javascript
复制
[Virtualization_containers]
name=Virtualization:containers (SLE_12_SP5)
enabled=1
autorefresh=0
baseurl=https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/
type=rpm-md
gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/repodata/repomd.xml.key

后:

代码语言:javascript
复制
[Virtualization_containers]
name=Virtualization:containers (SLE_12_SP5)
enabled=1
autorefresh=0
baseurl=http://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/
type=rpm-md

然后再试一次:

代码语言:javascript
复制
# zypper refresh
Repository 'SLES12-SP5-Pool' is up to date.
Repository 'SLES12-SP5-Updates' is up to date.
Repository 'Update' is up to date.
Retrieving repository 'Virtualization:containers (SLE_12_SP5)' metadata -------------------------------------------------------------------------------------------------[/]
Timeout exceeded when accessing 'http://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/repodata/a02bda6c6525d5d550e34e98844bf0e18a66aa1a24282c72a80c4679ef2e121d-primary.xml.gz'.
Abort, retry, ignore? [a/r/i] (r): i
Autoselecting 'r' after 7 seconds.
Retrieving repository 'Virtualization:containers (SLE_12_SP5)' metadata .............................................................................................[error]
Repository 'Virtualization:containers (SLE_12_SP5)' is invalid.
[Virtualization_containers|http://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'Virtualization:containers (SLE_12_SP5)' because of the above error.
Some of the repositories have not been refreshed because of an error.

第三次尝试

我尝试放弃zypper,使用另一种安装方法。我找到了一个RPM文件这里

https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/x86_64/码头-19.03.12_ce-378.39.x86_64.rpm

代码语言:javascript
复制
myserver:~/temp # systemctl stop docker
myserver:~/temp # docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
myserver:~/temp # rpm -ivh docker-19.03.12_ce-378.39.x86_64.rpm
error: Failed dependencies:
        catatonit is needed by docker-19.03.12_ce-378.39.x86_64
        containerd-git = 7ad184331fa3e55e52b890ea95e65ba581ae3429 is needed by docker-19.03.12_ce-378.39.x86_64
        docker-libnetwork-git = 026aabaa659832804b01754aaadd2c0f420c68b6 is needed by docker-19.03.12_ce-378.39.x86_64
        docker-runc-git = dc9208a3303feef5b3839f4323d9beb36df0a9dd is needed by docker-19.03.12_ce-378.39.x86_64
        fix_bsc_1057743 is needed by docker-19.03.12_ce-378.39.x86_64
https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/x86_64/docker-19.03.12_ce-378.39.x86_64.rpm

问题

那么我如何在SLES12.5上安装Docker呢?我能修好Redirect to protocol "http" not supported or disabled in libcurl吗?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-03-24 23:09:31

在这里行动。

尝试2应该有效,但是这个特定的URL (http://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/repodata/a02bda6c6525d5d550e34e98844bf0e18a66aa1a24282c72a80c4679ef2e121d-primary.xml.gz)被自动重定向到不同的opensuse存储库镜像之一。我试图通过wget直接下载它,它显示了重定向。由于不包含此镜像的网络连接允许列表,无法访问此镜像(因此导致超时)。修正是将此镜像包含在允许列表中。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/640705

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档