Docker
無法在 SLES 12.5 上執行“zypper refresh”
我正在嘗試在 SLES 12.5 上安裝 docker。我試圖按照這個 SO answer上的說明進行操作。
初步嘗試
# 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 文件
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
嗎?
在這。
嘗試 2 應該有效,但該特定 URL (
http://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP5/repodata/a02bda6c6525d5d550e34e98844bf0e18a66aa1a24282c72a80c4679ef2e121d-primary.xml.gz
) 被自動重定向到各種 opensuse 儲存庫鏡像之一。我通過嘗試直接下載它來解決它wget
,它顯示了重定向。由於網路連接允許列表中不包含此特定鏡像,因此無法訪問該鏡像(因此超時)。解決方法是將此鏡像包含在允許列表中。