Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install PECL SSH2 extension for PHP

Tags:

php

ssh

I am trying to install this http://fr2.php.net/manual/en/book.ssh2.php on a Centos 5 (a fork of RHEL 5).

I installed libssh2 (yum install libssh2) which is located in /usr/lib, and when I install SSH2 extension (via pecl install -f ssh2) I get this message

checking for ssh2 files in default path... not found configure: error: The required libssh2 library was not found. You can obtain that package from http://sourceforge.net/projects/libssh2/ ERROR: `/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr' failed

If I set /usr/lib, I get the same message

ERROR: `/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr/lib' failed

Where is the problem?

like image 744
Cédric Girard Avatar asked Feb 18 '09 13:02

Cédric Girard


People also ask

What is SSH2 PHP?

To install a PECL extension for multiple PHP versions, repeat the PECL extension installation for each PHP version. The SSH2 extension provides functions for accessing remote machines using the secure SSH and SFTP protocols.

What is PECL in Linux?

PECL (PHP Extension Community Library) is a spin-off of PEAR, and is primarily used to house groups of functions that are no longer bundled with the default installation of PHP. As of PHP 5, these extensions can be downloaded and installed separately from the regular PHP download.


1 Answers

Installing libssh2 via tar.gz from http://sourceforge.net/projects/libssh2/ help a lot (--with-ssh2=/usr/local/include/).

But "yum install libssh2-devel" is a better idea.

like image 173
Cédric Girard Avatar answered Oct 05 '22 16:10

Cédric Girard