Question

I have a problem with the update on php 5.4.9 (i install it with the ppa "ppa:ondrej/php5")

Now i have the problem that i can't install libssh2-php (which is required on my project)

I found some .deb files, but it's only for 32-bit systems.

So when i'm trying to install libssh2-php i have a collision with "libssh2-php:i386" and i have the following dependiesmessage:

ucf:i386 libc6:i386 (>= 2.4) libssh2-1:i386 (>= 1.0) and phpapi-20090626+lfs:i386

System: Ubuntu Server 12.04 LTS x64 | PHP 5.4.9

I also got a warning on running "php -v"

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/ssh2.so' - /usr/lib/php5/20100525/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0

Était-ce utile?

La solution

The problem is/was that the libssh2 is not aviable for PHP5.4.x AND a x64 system.

Autres conseils

I have the same problem trying to use ondrej's ppa for ubuntu 10.04 LTS. It seams that he didn't include the sssh extension.

Apt-get tries to install the version from default package which runs into conflict (depends phpapi-20090626+lfs) with current installed version, isn't it?

Only my backup php cli script needs this extension to run. After trying to solve dependencies witout success, I switched to a shell_exec('ssh ...@...') solution as workaround.

I am only a developer with advanced admin knowledge, no apt-get or linux packaging admin professional. There maybe other solution to fix this via packaging management or maybe building the needed version from source?

EDIT: There will be another nicer solution :-) you can use pecl to install / build the extension, here is what i have done:

$ sudo pecl install ssh2
Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed

$ sudo pecl install channel://pecl.php.net/ssh2-0.12
downloading ssh2-0.12.tgz ...
Starting to download ssh2-0.12.tgz (26,223 bytes)
[...]
Build process completed successfully
Installing '/usr/lib/php5/20100525+lfs/ssh2.so'
install ok: channel://pecl.php.net/ssh2-0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=ssh2.so" to php.ini

Afterwards I add extension=/usr/lib/php5/20100525+lfs/ssh2.so to php config.

Just do:

sudo aptitude purge php5-suhosin

It's described in detail here: bugs.debian.org

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top