我正在尝试安装:
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm
但它给了我:
Error:
Problem: conflicting requests
- nothing provides policycoreutils-python needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
尝试安装policycoreutils-python
也失败:
yum install policycoreutils-python
No match for argument: policycoreutils-python
Error: Unable to find a match: policycoreutils-python
但我已经有了:
yum install policycoreutils-python-utils
Package policycoreutils-python-utils-2.9-24.el8.noarch is already installed.
我认为包含哪些内容policycoreutils-python
?但我不确定如何解决此错误并安装container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm
。
我的操作系统是Red Hat Enterprise Linux 8.8
答案1
您不需要安装 RHEL7 RPM。存在完美合适的 RHEL8 RPM。
这失败了:
[root@rhel88-test ~]# yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 30 MB/s | 58 MB 00:01
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 31 MB/s | 62 MB 00:02
Last metadata expiration check: 0:00:16 ago on Fri 28 Jul 2023 07:05:26 AM EDT.
container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm 838 kB/s | 40 kB 00:00
Error:
Problem: conflicting requests
- nothing provides policycoreutils-python needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
但这工作得很好:
[root@rhel88-test ~]# dnf install container-selinux
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:33 ago on Fri 28 Jul 2023 07:05:26 AM EDT.
Dependencies resolved.
=======================================================================================================================================================================================================
Package Architecture Version Repository Size
=======================================================================================================================================================================================================
Installing:
container-selinux noarch 2:2.205.0-2.module+el8.8.0+18438+15d3aa65 rhel-8-for-x86_64-appstream-rpms 64 k
Enabling module streams:
container-tools rhel8
Transaction Summary
=======================================================================================================================================================================================================
Install 1 Package
Total download size: 64 k
Installed size: 62 k
Is this ok [y/N]: y
Downloading Packages:
container-selinux-2.205.0-2.module+el8.8.0+18438+15d3aa65.noarch.rpm 294 kB/s | 64 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 291 kB/s | 64 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 4.9 MB/s | 5.0 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: container-selinux-2:2.205.0-2.module+el8.8.0+18438+15d3aa65.noarch 1/1
Installing : container-selinux-2:2.205.0-2.module+el8.8.0+18438+15d3aa65.noarch 1/1
Running scriptlet: container-selinux-2:2.205.0-2.module+el8.8.0+18438+15d3aa65.noarch 1/1
Verifying : container-selinux-2:2.205.0-2.module+el8.8.0+18438+15d3aa65.noarch 1/1
Installed products updated.
Installed:
container-selinux-2:2.205.0-2.module+el8.8.0+18438+15d3aa65.noarch
Complete!