Module Installation php libssh2 on CentOS 6.x

Sunday, 08 February 2015 16:32

Today, faced with the problem of installing php module libssh2 on a server with Centos 6.6 and PHP 5.4.37.

A simple way, like team pecl install ssh2, the module becomes refused flies error "Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://" to install install failed".

To deal with this, I did not, and went the other way.

So, first install the necessary packages:

yum install gcc php-devel php-pear openssl openssl-devel httpd-devel make

 Now install extensions libssh2, the latest version of which can be found at At the moment it libssh2-1.4.3.

tar vxzf libssh2-1.4.3.tar.gz
cd libssh2-1.4.3
make install

Next, put the package php-ssh2, which take away from the page The latest version is now ssh2-0.12.

tar vxzf ssh2-0.12.tgz
cd ssh2-0.12
./configure --with-ssh2
make install

Check that the folder /usr/lib64/php/modules we have a file

If all is well, then create a file folder /etc/php.d ssh2.ini and enter into it:

Now restart the web server command:

service httpd restart

Finally check whether normally have to install the module:

php -m | grep ssh2

It works :)

/root/modulos/ssh2-0.12/ssh2.c: In function ‘zif_ssh2_auth_agent’:
/root/modulos/ssh2-0.12/ssh2.c:1154:2: error: unknown type name ‘LIBSSH2_AGENT’
help D:

NA NA | Saturday, 25 July 2015 07:16

Leave a comment

  • Payment
  • visa
  • mastercard
  • qiwi
  • webmoney
  • yandex money
  • sberbank
  • mts bank
  • zpayment
  • liqpay
  • alfabank white
Copyright © 2012 - 2024 WebPatron Ltd. All rights reserved.