chenco

Member
Dec 18, 2017
5
0
1
Israel
cPanel Access Level
DataCenter Provider
Hello,
Im trying to install ssh2 on PHP7 version
I go to pecl in whm panel then i search for SSH2,
when trying to install i get this error :
pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.26
No valid packages found
install failed



Is there any workaround?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

The ssh2 PECL module for PHP currently only supports PHP 7.x in it's "alpha" version. Since a stable version is not yet available, the module installer interface does not support it's installation. As a workaround, you can manually install the PECL module from the command line. EX:

Code:
/opt/cpanel/ea-php70/root/usr/bin/pecl install https://pecl.php.net/get/ssh2-1.1.2.tgz
Simply replace "php70" with each version of PHP 7 you'd like to install it for. Note that internal case EA-6158 is open to address the issue where the alpha and beta versions of PECL modules such as SSH2 appear to be available for installation in WHM, yet the installation fails because WHM will always attempt to install the stable version.

Thank you.
 

grayloon

Well-Known Member
Oct 31, 2007
121
4
68
Evansville, IN
cPanel Access Level
Root Administrator
Twitter
I'm resurrecting this thread, because I'm running into the same issue. I have a new cloud server running CentOS 7 that shows libssh2 is installed:
Code:
# rpm -qa|grep ssh2
libssh2-1.4.3-10.el7_2.1.x86_64
When I try to install ssh2 PECL module, I get an error:
Code:
configure: error: The required libssh2 library was not found.  You can obtain that package from http://sourceforge.net/projects/libssh2/
ERROR: `/root/tmp/pear/ssh2/configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config --with-ssh2' failed
Any suggestions?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello @grayloon,

Check to verify the libssh2-devel RPM is installed, as it's a prerequisite. You can install it using the following command:

Code:
yum install libssh2-devel
Thank you.