GNU/Linux >> Tutoriels Linux >  >> Cent OS

Commande semanage introuvable dans CentOS 8 / RHEL 8

semanage (SELinux Policy Management Tool) est utilisé pour configurer certaines parties de la politique SELinux sans nécessiter de modification ou de recompilation à partir des sources de politique.

Cet article vous aidera à installer les packages nécessaires pour obtenir la commande semanage.

Voyons quel paquet nous fournit la commande semanage en utilisant la commande YUM.

yum whatprovides semanage

OU

yum provides *bin/semanage

Sortie :

Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                          1.4 MB/s | 7.6 MB     00:05
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                             1.3 MB/s | 4.7 MB     00:03
Last metadata expiration check: 0:00:05 ago on Wed 17 Jul 2019 06:34:12 AM EDT.
policycoreutils-python-utils-2.8-16.1.el8.noarch : SELinux policy core python utilities
Repo        : rhel-8-for-x86_64-baseos-rpms
Matched from:
Filename    : /usr/sbin/semanage
La sortie ci-dessus vous indique que le package policycoreutils-python-utils vous fournit la commande semanage.

Maintenant, installez le package policycoreutils-python-utils à l'aide de la commande YUM.

yum install -y policycoreutils-python-utils

Sortie :

Updating Subscription Management repositories.
Last metadata expiration check: 0:01:39 ago on Wed 17 Jul 2019 06:34:12 AM EDT.
Dependencies resolved.
==================================================================================================================
 Package                        Arch     Version                            Repository                       Size
==================================================================================================================
Installing:
 policycoreutils-python-utils   noarch   2.8-16.1.el8                       rhel-8-for-x86_64-baseos-rpms   228 k
Installing dependencies:
 python3-policycoreutils        noarch   2.8-16.1.el8                       rhel-8-for-x86_64-baseos-rpms   2.2 M
 python3-libsemanage            x86_64   2.8-5.el8                          rhel-8-for-x86_64-baseos-rpms   127 k
 python3-setools                x86_64   4.2.0-2.el8                        rhel-8-for-x86_64-baseos-rpms   598 k
 checkpolicy                    x86_64   2.8-2.el8                          rhel-8-for-x86_64-baseos-rpms   338 k
 python3-audit                  x86_64   3.0-0.10.20180831git0047a6c.el8    rhel-8-for-x86_64-baseos-rpms    85 k

Transaction Summary
==================================================================================================================
Install  6 Packages

Total download size: 3.6 M
Installed size: 9.9 M
Downloading Packages:
(1/6): python3-setools-4.2.0-2.el8.x86_64.rpm                                     372 kB/s | 598 kB     00:01
(2/6): python3-libsemanage-2.8-5.el8.x86_64.rpm                                    69 kB/s | 127 kB     00:01
(3/6): python3-policycoreutils-2.8-16.1.el8.noarch.rpm                            1.1 MB/s | 2.2 MB     00:02
(4/6): python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64.rpm                   170 kB/s |  85 kB     00:00
(5/6): checkpolicy-2.8-2.el8.x86_64.rpm                                           437 kB/s | 338 kB     00:00
(6/6): policycoreutils-python-utils-2.8-16.1.el8.noarch.rpm                       691 kB/s | 228 kB     00:00
------------------------------------------------------------------------------------------------------------------
Total                                                                             1.5 MB/s | 3.6 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                          1/1
  Installing       : python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64                                     1/6
  Installing       : checkpolicy-2.8-2.el8.x86_64                                                             2/6
  Installing       : python3-setools-4.2.0-2.el8.x86_64                                                       3/6
  Installing       : python3-libsemanage-2.8-5.el8.x86_64                                                     4/6
  Installing       : python3-policycoreutils-2.8-16.1.el8.noarch                                              5/6
  Installing       : policycoreutils-python-utils-2.8-16.1.el8.noarch                                         6/6
  Running scriptlet: policycoreutils-python-utils-2.8-16.1.el8.noarch                                         6/6
  Verifying        : python3-policycoreutils-2.8-16.1.el8.noarch                                              1/6
  Verifying        : python3-libsemanage-2.8-5.el8.x86_64                                                     2/6
  Verifying        : python3-setools-4.2.0-2.el8.x86_64                                                       3/6
  Verifying        : checkpolicy-2.8-2.el8.x86_64                                                             4/6
  Verifying        : python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64                                     5/6
  Verifying        : policycoreutils-python-utils-2.8-16.1.el8.noarch                                         6/6
Installed products updated.

Installed:
  policycoreutils-python-utils-2.8-16.1.el8.noarch      python3-policycoreutils-2.8-16.1.el8.noarch
  python3-libsemanage-2.8-5.el8.x86_64                  python3-setools-4.2.0-2.el8.x86_64
  checkpolicy-2.8-2.el8.x86_64                          python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64

Complete!

Une fois l'installation terminée, lancez le semanage pour voir s'il est disponible ou non.

semanage -h

C'est tout.


Cent OS
  1. Comment réparer l'erreur "commande semanage" introuvable dans CentOS

  2. Commande ifconfig introuvable sur l'installation minimale de CentOS 7

  3. "-bash:route:commande introuvable" sur CentOS/RHEL 7

  4. id :commande introuvable

  5. w :commande introuvable

Commande semanage introuvable dans CentOS 7/6 et RHEL 7/6 - Solution rapide

Commande netstat introuvable sur CentOS 8 / RHEL 8 - Solution rapide

Commande ifconfig introuvable sur CentOS 8 / RHEL 8 - Solution rapide

Dépannage Linux - commande netstat introuvable dans CentOS 7/8 et RHEL 7/8

Comment réparer la commande Ifconfig introuvable sur CentOS 7

"lsb_release :commande introuvable" – Correction dans CentOS/RHEL