The libssh2 1.9 can't be installed from EPEL repository on RHEL 8.1 and newer (tested on RHEL 8.3):

# dnf --enablerepo=epel install libssh2-1.9.0
All matches were filtered out by modular filtering for argument: libssh2-1.9.0
Error: Unable to find a match: libssh2-1.9.0

Other EPEL RPMs can be installed without any obstacles.

How can I install the libssh2 without downloading it and installing localy?


The easiest you can do is bypass module filtering.

Edit /etc/yum.repos.d/epel.repo and add module_hotfixes=1 line under the [epel] section.

Done. The installation will succeed.

However the above can be too broad solution. The alternative could be to set module_hotfixes just in the command via --setopt:

dnf --enablerepo=epel --setopt=epel.module_hotfixes=true install libssh2-1.9.0
  • Works, however I'm afraid that it can have unwanted side-effects because it is set permanently. Probably better would be to use it as setopt cmdline parameter: dnf --enablerepo=epel --setopt=epel.module_hotfixes=true install libssh2-1.9.0. Please add this option to your answer. I consider it cleaner. And thank you very much for your help! Apr 12 '21 at 7:27

The libssh2 1.8 RPM used to be part of RHEL 8.0. However libssh2-devel and libssh2-docs were never included to RHEL and were provided in EPEL. That complicated the usability of this package. So as of RHEL 8.1 libssh2 was moved to the EPEL as well. However it wasn't removed from modules.yaml metadata file of the repository rhel-8-for-x86_64-appstream-rpms. That's the problem.

If you want to install the EPEL version, it is necessary to temporarily disable the AppStream repository:

# dnf --enablerepo=epel --disablerepo=rhel-8-for-x86_64-appstream-rpms install libssh2-1.9.0

Then the installation then pass.

The modules metadata available on the RHEL 8.3 installation DVD ISO do not know the libssh2 and when this media is used as repository, you won't face this problem.

Red Hat is aware of the issue: https://bugzilla.redhat.com/show_bug.cgi?id=1805260

The CentOS 8.1+ is probably affected as well, however I haven't checked.

  • This isn't correct. libssh2 and libssh2-devel are available in both RHEL 8.3 and CentOS 8.3. Apr 9 '21 at 17:55
  • 1
    There is only libssh2-1.8.0 in the RHEL. If you want newer version 1.9, you have to use EPEL. The RH itself claimes they removed libssh2 from RHEL8 intentionally: bugzilla.redhat.com/show_bug.cgi?id=1660344 Apr 12 '21 at 5:52
  • If you run yum list available | grep libssh2 on a RHEL 8 or CentOS 8 system, then it is provided by the RHEL and CentOS repos. As 1.8 is the supported version from Red Hat , that is the one that should be installed on the system. If 1.9 is needed for something, then the best thing to do is to build it from source and add add it to the environment or else it could cause conflicts because other packages on the system will be looking for 1.8. Apr 12 '21 at 6:10
  • 1
    Well, in principle you're correct and I'd agree with you. However the support of libssh2 was officially dropped in 8.1 and if you need version 1.9 modules, which block the update, give you quite a headache. RH left the libssh2 in 'grey' zone... Rules for AppStream repository are not so strong as in case of the BaseOS. Apr 12 '21 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.