views:

3871

answers:

2

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) wich 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?

Thanks Cédric

+1  A: 

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.

Cédric Girard
A: 

Surfing for a solution to this problem. I looked in the FAQ, but didn't see any mention of bumping issues. I hope this is okay.

I'm on a Pair.com "Advanced" hosted account, so I'm a little limited on what I'm allowed to do. I don't think I can yum nor aptitude nor any of the other pre-compiled packages?

I've downloaded and compiled libssh2. During the pecl process, it asks where the library is located. It's in "~/usr/local/lib" and I've tried several variations, including fully qualified. But I keep getting the same error.

The error message doesn't spell out precisely which file it's looking for. libssh2.so is in that directory. I know the output is supposed to be ssh2.so. Is there supposed to be an ss2.something? Or libssh.nothing?


Added later:

In my case, after compiling libssh2 I downloaded the PEAR tarball. The trick was:

./configure --with-ssh2=<libssh2 location> --prefix=<libssh2 location>

Another trick is that, since Pair.com is running FreeBSD, I have to do a "cd ." after the ./configure command. Otherwise, make produces a "Permission denied" error. Apparently, this is necessary on all *nix BSD flavors.

Mighty