install ssh2() HELP!

sikkhosting

Verified User
Joined
Jul 7, 2006
Messages
7
Hello!

Alright I need some help installing ssh2.

I followed the instructions found here:
http://us2.php.net/manual/en/ref.ssh2.php

here's what I did:

1)
PHP:
yum install openssl
it installed successfully and also installed openssl-devel as well.

2) I downloaded and installed libssh2 successfully :). I used their command to do it (./configure && make all install)

3)
PHP:
pecl install ssh2-beta
and I get the following..

PHP:
[root@server ssh2-0.10]# pecl install ssh2-beta
downloading ssh2-0.10.tgz ...
Starting to download ssh2-0.10.tgz (22,187 bytes)
........done: 22,187 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
/usr/local/bin/phpize: /tmp/tmp1wooP3/ssh2-0.10/build/shtool: /bin/sh: bad interpreter: Permission denied
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

ERROR: `phpize' failed

I have also tried downloaded and doing a manual install of ssh2-beta but I still find myself getting the same ending error about phpize and autoconf...

PLEASE HELP! Thanks a million!
 
Ah!

Okay so I took another look at the error message and something jumped into my head. I noticed it said /bin/sh couldn't interpret

so I editted shtool and replaced it with !/bin/bash and it fixed itself!

=D
 
I managed to get ssh2 installed by using the pecl install ssh2 command aswell.

I have tried to enable it in my php.ini file but it wont load.

Code:
# locate ssh2
/usr/local/lib/php/extensions/ssh2.so

In my php.ini i added/edited the following

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/"
extension = ssh2.so

is this correct as its still not working?

Nick

Forgot to mention that pear install ssh2 didnt work. got the following error
Code:
]# pear install ssh2
No releases available for package "pear.php.net/ssh2" - package pecl/ssh2 can be installed with "pecl install ssh2"
Cannot initialize 'ssh2', invalid or missing package file
Package "ssh2" is not valid
install failed

After i ran this first i done the command i mentioned at the top of pecl install ssh2 but stil cant get php to use it
 
Last edited:
Ah!

Okay so I took another look at the error message and something jumped into my head. I noticed it said /bin/sh couldn't interpret

so I editted shtool and replaced it with !/bin/bash and it fixed itself!

=D

Can you Elaborate on this? I am somewhat of a Linux noob and have no idea how you would replace it with !/bin/bash if its in an install script already.

Would really appreciate it, having this exact same problem.
 
You should have a link from /bin/sh to /bin/bash. If you don't, you either need to create one (possibly removing /bin/sh if it exists), or change your script to use /bin/bash.

For more information see this Wikipedia article.

Jeff
 
Back
Top