7

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?

Jaroslav Kucera
  • 9,422
  • 5
  • 15
  • 28

2 Answers2

6

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
Jaroslav Kucera
  • 9,422
  • 5
  • 15
  • 28
Danila Vershinin
  • 1,471
  • 9
  • 11
  • 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! – Jaroslav Kucera Apr 12 '21 at 07:27
  • Do you have a recommendation for how to address this in a copr, where I do not know how to directly affect the dnf invocation at the start of the build? – bgStack15 Jun 07 '22 at 23:28
0

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.

Jaroslav Kucera
  • 9,422
  • 5
  • 15
  • 28
  • This isn't correct. `libssh2` and `libssh2-devel` are available in both RHEL 8.3 and CentOS 8.3. – Nasir Riley Apr 09 '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: https://bugzilla.redhat.com/show_bug.cgi?id=1660344 – Jaroslav Kucera Apr 12 '21 at 05: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. – Nasir Riley Apr 12 '21 at 06: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. – Jaroslav Kucera Apr 12 '21 at 10:24