1

I've installed 2 php versions on my server (which is managed by ISPconfig 3) using this howto: https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/

I'm trying to add pecl ssh2 extension only to my 5.6 installation.

cd /opt/php-5.6.30/etc
pecl -C pear.conf install ssh2-0.13

pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.22-0ubuntu0.16.04.1 

Any help will be appreciated!

Tzahi Serruya
  • 147
  • 2
  • 11

3 Answers3

3

Try this:

pecl install ssh2-1.1.2

You can see available versions HERE

For those using alpine linux, make sure to add libssh2-dev first:

apk --update add libssh2-dev 
lloiacono
  • 4,714
  • 2
  • 30
  • 46
0

Done by changing the pecl script to always work through php5.6 version

Edited:

nano /usr/bin/pecl 

And added this line after the first code block (after it checks the php version )

PHP="/opt/php-5.6.30/bin/php"

Don't forget to change it back after installation.

Tzahi Serruya
  • 147
  • 2
  • 11
0

I think you need to install beta version.

apt-get update && \
apt-get install -y git libssh2-1 libssh2-1-dev && \
pecl install ssh2-beta