Hi,
I wanted to try out plenv and install modules without "disturbing" system perl. Followed the instructions and plenv installed without any issues. While installing the Net::SSH2 modules, I kept getting errors. The steps given below are for those who might face similar issues. Hope someone here finds it helpful.
Apologies if this is posted in wrong section. Just wanted to post this to help those who might be in a similar situation
Before you install Net::SSH2, install the following:
sudo apt install libssh2-1-dev sudo apt install openssh-server sudo apt install zlib1g-dev
Once these are installed successfully, then proceed with installing the Net::SSH2 module. Since I had earlier installed plenv, it seems to have installed cpanm in my home directory as shown below.
pritesh@thinkpad:~$ which cpanm /home/pritesh/.plenv/shims/cpanm pritesh@thinkpad:~$
Then I simply installed Net::SSH2 using the following command
cpanm Net::SSH2
Then just to see if all is well, I ran the following command
pritesh@thinkpad:~$ perl -e "Net::SSH2" pritesh@thinkpad:~$
Updated as per the error pointed out. Thanks.
pritesh@thinkpad:~$ perl -e "use Net::SSH2" pritesh@thinkpad:~$
Indeed all is well.
Note:- Big thank you to the Strawberry Perl folks. While on Windows, I was using Strawberry Perl and installing a module was trivial. Only upon trying to install the Net::SSH2 module on linux did I understand how much care the Strawberry Perl folks have taken to make things work on Windows.
Unfortunately I will not be able to go back to Windows on this laptop. After upgrading the RAM, Windows would not boot. Reinstalling the OS also did not help and I kept getting random blue screens, both with Windows 7 and 10. Memory tests ran all fine. So tried Ubuntu 16.04.2 and it seems to have no issues.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Resolving issues while installing Net::SSH2 on Ubuntu 16.04.2
by kcott (Archbishop) on Mar 05, 2017 at 06:12 UTC | |
by pritesh_ugrankar (Monk) on Mar 05, 2017 at 14:20 UTC |