我們想在我們的系統上安裝 docker 軟體包RHEL 8.4伺服器(這是離線安裝,因為機器未連接到網路)
所以我們從網站下載以下 rpm -https://download.docker.com/linux/centos/8/x86_64/stable/Packages/
-rw-r--r-- 1 root root 34558068 Sep 6 14:41 containerd.io-1.6.9-3.1.el8.x86_64.rpm
-rw-r--r-- 1 root root 3930488 Sep 6 14:42 docker-scan-plugin-0.9.0-3.el8.x86_64.rpm
-rw-r--r-- 1 root root 13710120 Sep 6 14:42 docker-buildx-plugin-0.11.2-1.el8.x86_64.rpm
-rw-r--r-- 1 root root 25375804 Sep 6 14:42 docker-ce-24.0.6-1.el8.x86_64.rpm
-rw-r--r-- 1 root root 7514336 Sep 6 14:43 docker-ce-cli-24.0.6-1.el8.x86_64.rpm
-rw-r--r-- 1 root root 5119608 Sep 6 14:43 docker-ce-rootless-extras-24.0.6-1.el8.x86_64.rpm
-rw-r--r-- 1 root root 7370924 Sep 6 14:43 docker-compose-plugin-2.6.0-3.el8.x86_64.rpm
然後我們嘗試安裝 rpm,如下所示
yum localinstall docker-ce-24.0.6-1.el8.x86_64.rpm docker-scan-plugin-0.9.0-3.el8.x86_64.rpm docker-buildx-plugin-0.11.2-1.el8.x86_64.rpm docker-ce-cli-24.0.6-1.el8.x86_64.rpm docker-ce-rootless-extras-24.0.6-1.el8.x86_64.rpm
Failed loading plugin "product-id": No module named 'subscription_manager.productid'
Failed loading plugin "subscription-manager": cannot import name 'injection'
Failed loading plugin "upload-profile": cannot import name 'packageprofilelib'
Last metadata expiration check: 2:49:54 ago on Wed 06 Sep 2023 12:21:52 PM UTC.
Error:
Problem 1: conflicting requests
- nothing provides containerd.io >= 1.6.4 needed by docker-ce-3:24.0.6-1.el8.x86_64
Problem 2: package docker-ce-rootless-extras-24.0.6-1.el8.x86_64 requires docker-ce, but none of the providers can be installed
- conflicting requests
- nothing provides containerd.io >= 1.6.4 needed by docker-ce-3:24.0.6-1.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
正如我們從上面看到的,異常是關於:
nothing provides containerd.io >= 1.6.4 needed by docker-ce-3:24.0.6-1.el8.x86_64
但我們的containerd.io rpm之一已經有了版本 -1.6.9-3.1
所以我不明白為什麼 rpm -docker-ce-24.0.6-1.el8.x86_64.rpm
抱怨這個
有什麼建議來解決這個問題嗎?