Unable to install a custom SELinux module: "policydb module version XX does not match my version" error

Solution Verified - Updated -

Issue

  • When trying to load a custom SELinux module, the following error is displayed

    # semodule -i MYMODULE.pp
    libsepol.policydb_read: policydb module version XX does not match my version range YY-ZZ (No such file or directory).
    libsepol.sepol_module_package_read: invalid module in module package (at section 0) (No such file or directory).
    libsemanage.semanage_load_module: Error while reading from module file /etc/selinux/targeted/modules/tmp/modules/MYMODULE.pp. (No such file or directory).
    semodule:  Failed!
    

Environment

  • Red Hat Enterprise Linux
  • selinux-policy

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content