We have struggled with this too, so will share the minimum steps needed to setup Net::SSH2 lib on Cent OS:
- Install pre-requisite libs:
- sudo yum install libgcrypt-devel
- sudo yum install zlib-devel
- Download libssh2 source code from here.
- Untar and cd to the extracted directory.
- Execute: ./configure — This will verify availability of packages installed in step 1 and write Makefile.
- Execute: make — This will compile the libssh2 source code.
- Execute: sudo make install — This will install libssh2 shared libs at /usr/local/lib
- Execute: export LD_LIBRARY_PATH=/usr/local/lib
- Download Net::SSH2 library source code from CPAN.
- Untar and cd to the extracted directory.
- Execute: perl Makefile.PL gcrypt
- Execute: make
- Execute: sudo make install
This should be all for installing Net::SSH2 lib on Cent OS. Incase you face any issues, please leave a comment, and we will try to help.
Note: The above has been tested successfully against Cent OS 5.6 image.
Leave a Reply