Search code examples
phpsshscpphpseclib

How to install phpseclib under CentOS 8?


I am using the Remi repo to get packages under CentOS 8 as it generally seems to have what I need, but now I am trying to install phpseclib and running into issues. I am following the install steps given on this page: https://centos.pkgs.org/8/remi-x86_64/php-phpseclib-net-sftp-1.0.17-1.el8.remi.noarch.rpm.html

The first thing is to download that latest remi-release*rpm

$ wget http://rpms.remirepo.net/enterprise/8/remi/x86_64/remi-release-8.1-2.el8.remi.noarch.rpm
--2020-03-18 14:08:05--  http://rpms.remirepo.net/enterprise/8/remi/x86_64/remi-release-8.1-2.el8.remi.noarch.rpm
Resolving rpms.remirepo.net (rpms.remirepo.net)... 2001:bc8:33a1:100::1, 195.154.241.117
Connecting to rpms.remirepo.net (rpms.remirepo.net)|2001:bc8:33a1:100::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23420 (23K) [application/x-rpm]
Saving to: ‘remi-release-8.1-2.el8.remi.noarch.rpm’

remi-release-8.1-2.el8.remi.noarch.rpm          100%[======================================================================================================>]  22.87K  --.-KB/s    in 0.02s

2020-03-18 14:08:05 (1.02 MB/s) - ‘remi-release-8.1-2.el8.remi.noarch.rpm’ saved [23420/23420]

This went fine. Next, install it:

$ sudo rpm -Uvh remi-release-8.1-2.el8.remi.noarch.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:remi-release-8.1-2.el8.remi      ################################# [ 50%]
Cleaning up / removing...
   2:remi-release-8.0-4.el8.remi      ################################# [100%]

Finally install php-phpseclib-net-sftp rpm package:

$ sudo dnf --enablerepo=remi install php-phpseclib-net-sftp
CentOS-8 - AppStream                                                                                                                                           1.0 MB/s | 4.3 kB     00:00
CentOS-8 - Base                                                                                                                                                1.1 MB/s | 3.8 kB     00:00
CentOS-8 - Extras                                                                                                                                              424 kB/s | 1.5 kB     00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                                          43 kB/s |  29 kB     00:00
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                  40 kB/s |  23 kB     00:00
phalcon_stable                                                                                                                                                 1.2 kB/s | 951  B     00:00
phalcon_stable-source                                                                                                                                          1.2 kB/s | 951  B     00:00
Remi's Modular repository for Enterprise Linux 8 - x86_64                                                                                                       58 kB/s | 3.5 kB     00:00
Safe Remi's RPM repository for Enterprise Linux 8 - x86_64                                                                                                      51 kB/s | 3.0 kB     00:00
Remi's RPM repository for Enterprise Linux 8 - x86_64                                                                                                           43 kB/s | 3.0 kB     00:00
Remi's RPM repository for Enterprise Linux 8 - x86_64                                                                                                          8.5 MB/s | 2.8 MB     00:00
Error:
 Problem: package php-phpseclib-net-sftp-1.0.18-1.el8.remi.noarch requires php-pear(phpseclib.sourceforge.net/Net_SSH2) >= 0.3.0, but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides php-pear(phpseclib.sourceforge.net/Math_BigInteger) >= 0.3.0 needed by php-phpseclib-net-ssh2-1.0.17-1.el8.remi.noarch
  - nothing provides php-pear(phpseclib.sourceforge.net/Math_BigInteger) >= 0.3.0 needed by php-phpseclib-net-ssh2-1.0.18-1.el8.remi.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Where can I get the missing packages at the correct levels? Net_SSH2 Math_BigInteger

TIA


Solution

  • 1/ you probably need php-phpseclib which is the new version 2 library.

    2/ indeed php-pear-math-biginteger was missing for the old version 1 components

    It is now available (soon on the mirror near you)

    Notice: probably better to report on the right place if you want to get attention from the proper person, instead of some random site...