初步尝试

初步尝试

我正在尝试在 SLES 12.5 上安装 docker。我尝试按照以下说明进行操作这个答案

初步尝试

# 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.
# 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按如下方式编辑文件:

前:

[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

后:

[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

然后再次尝试:

# 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/docker-19.03.12_ce-378.39.x86_64.rpm

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

问题

那么如何在 SLES 12.5 上安装 Docker?我可以修复吗Redirect to protocol "http" not supported or disabled in libcurl

答案1

在这里。

尝试 2 应该已经成功,但是特定的 URL ( http://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/repodata/a02bda6c6525d5d550e34e98844bf0e18a66aa1a24282c72a80c4679ef2e121d-primary.xml.gz) 被自动重定向到各个 opensuse 存储库镜像之一。我通过尝试直接下载它来解决这个问题wget,它显示了重定向。由于网络连接允许列表不包含此特定镜像,因此无法访问该镜像(因此超时)。解决方法是将此镜像包含在白名单中。

相关内容