LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   problem installing libssh2-0.18 (https://www.linuxquestions.org/questions/linux-software-2/problem-installing-libssh2-0-18-a-610036/)

rh-penguin 12-30-2007 08:45 PM

problem installing libssh2-0.18
 
hi,

When i try and run make in libssh2 root dir i get the following:
Code:

db1:/home/efp/forCompile/libssh2-0.18# make
Making all in src
make[1]: Entering directory `/home/efp/forCompile/libssh2-0.18/src'
make  all-am
make[2]: Entering directory `/home/efp/forCompile/libssh2-0.18/src'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/efp/forCompile/libssh2-0.18/src'
make[1]: Leaving directory `/home/efp/forCompile/libssh2-0.18/src'
Making all in example
make[1]: Entering directory `/home/efp/forCompile/libssh2-0.18/example'
Making all in simple
make[2]: Entering directory `/home/efp/forCompile/libssh2-0.18/example/simple'
make  all-am
make[3]: Entering directory `/home/efp/forCompile/libssh2-0.18/example/simple'
/bin/sh ../../libtool --tag=CC --mode=link gcc  -g -O2 -I/usr/local/ssl/include  -L/usr/local/ssl/lib -lcrypto -o ssh2  ssh2.o ../../src/libssh2.la
gcc -g -O2 -I/usr/local/ssl/include -o .libs/ssh2 ssh2.o  -L/usr/local/ssl/lib -lcrypto ../../src/.libs/libssh2.so  -Wl,--rpath -Wl,/usr/local/lib
../../src/.libs/libssh2.so: undefined reference to `dlerror'
../../src/.libs/libssh2.so: undefined reference to `dlclose'
../../src/.libs/libssh2.so: undefined reference to `dlopen'
../../src/.libs/libssh2.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[3]: *** [ssh2] Error 1
make[3]: Leaving directory `/home/efp/forCompile/libssh2-0.18/example/simple'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/efp/forCompile/libssh2-0.18/example/simple'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/efp/forCompile/libssh2-0.18/example'
make: *** [all-recursive] Error 1

I must be missing some sort of lib. Anyone know what to do?
Im using Debian Etch.

deepumnit 12-30-2007 09:29 PM

Hey yeah, even I do not understand as to why this problem occurs. Can anyone try and explain it? What type of error is this 'recursive' thing?

rh-penguin 12-31-2007 10:38 AM

I got it working. This is what i did.

1. Fresh install of debian etch.
2. Removed openssl(its installed by default)
3. sudo apt-get install apache2 php5 libapache2-mod-php5 g++
4. sudo aptitude install php5-dev php5-cli php-pear libcurl3-openssl-dev zlib1g-dev
5. Installed libssh2-0.18 from source
6. Installed ssh2-0.10 from source(pecl install -f ssh2 didnt work for me) apparently this version needs to be patched and that was the case for me. If you also get this when trying to install ssh2,
Code:

make: *** [ssh2.lo] Error 1
ERROR: `make' failed

do the follwoing:
Download this patch: http://www.billpitz.com/howto/php-libssh2.diff and place it in the ssh2-0.10 dir.
Type: patch < php-libssh2.diff to apply the patch.
Then carry on installing as you wish. (i did: phpize && ./configure --with-ssh2 && make)
7. If all goes well at the end of ssh2 install it will tell you its created the ssh2.so module. Its in modules dir. Copy it to where all your other mnodules are, by default there at /usr/lib/php5/20060613+lfs/
8. Add: extension=ssh2.so to your php.ini file.
9. Restart apache /etc/init.d/apache2 restart
And thats it. Now all you need to do is create a php file interacting with ssh2.

Hope that helps!
Happy new year!


All times are GMT -5. The time now is 04:04 AM.