1

I have installed this module using yum on a different Linux distribution without issues. But when I go to install this module on my CentOS 7.0 distro it says the package does not exist. Here is what I'm getting:

[root@server]# yum install perl-Net-SSH-Perl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.supremebytes.com
 * extras: centos.mirror.ndchost.com
 * updates: centos-distro.cavecreek.net
No package perl-Net-SSH-Perl available.
Error: Nothing to do

I don't know if this is not available with this distro or what I might be missing. I tried many different package names as well, all of which say no package available. I'm specifically using this in perl:

Net::SSH::Expect

I am desperately depend on this to get my scripts working on this distro. Any help would be greatly appreciated. Thanks.

toolic
  • 57,801
  • 17
  • 75
  • 117
Bugsta
  • 51
  • 2
  • 7
  • 3
    `yum install perl-Net-OpenSSH` => https://metacpan.org/pod/Net::OpenSSH (or use `cpan` from `perl-CPAN` to manually install Net::SSH::Perl) – mpapec Oct 08 '15 at 16:47
  • 2
    When in doubt, `yum search perl-net-` and see examine your options. – Michael Berkowski Oct 08 '15 at 16:48
  • 3
    The correct package name for Net::SSH::Expect would be perl-Net-SSH-Expect. It looks like it's [available in EPEL 6](https://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/perl-Net-SSH-Expect.html) but not EPEL 7. You can try [finding a suitable RPM online](http://rpm.pbone.net/index.php3?stat=3&search=perl-Net-SSH-Expect) and installing it manually, but it doesn't look like there are any available for EL7, so may have to compile it yourself. Alternatively, you can install it with cpan, although generally it's not a good idea to install modules from cpan and from OS packages together. – ThisSuitIsBlackNot Oct 08 '15 at 16:55
  • Thank you all for the helpful advice. It looks like I'm screwed since they don't have it available for this version yet. I searched for an RPM, but there is nothing for this distro. Is it crazy to try one that's made for another distro? Ids there one that would be most suitable for CentOS 7? – Bugsta Oct 08 '15 at 17:22
  • Do you have to use the system Perl? If not, I think the easiest thing would be to install [perlbrew](http://perlbrew.pl/), build a new perl, and install the module there using cpan. That way you're not mixing RPMs and cpan-installed modules. – ThisSuitIsBlackNot Oct 08 '15 at 17:40
  • My understanding is a bit limited, but I don't think there would be a problem using a different perl. I'm assuming a perl script is a perl script and can run the same in any version of perl. I have never installed anything using cpan before. I'm assuming I need to install that first. If you have any info on how to install and use cpan to do this I would greatly appreciate it. Thanks again. – Bugsta Oct 08 '15 at 17:45
  • @Bugsta cpan is installed with perl by default. I would install perlbrew first...perlbrew lets you install multiple perls in your home directory and switch between them easily. See the link in my previous comment for instructions. You can then build a new perl in your home directory and install all of the modules you need using cpan. For that, see [What's the easiest way to install a missing Perl module?](http://stackoverflow.com/q/65865/176646) If that's too much trouble, you *can* just run `sudo cpan Net::SSH::Expect` to install it in the system Perl, but that can lead to headaches later on. – ThisSuitIsBlackNot Oct 08 '15 at 17:57
  • Thank you so much. I'm going to try that. So after installing perlbrew I just have to make sure that when invoking a perl script I tell it to run using perlbrew rather then the system perl correct? – Bugsta Oct 08 '15 at 18:03
  • Okay I chickened out and just used had cpan to install Net:SSH:Expect. So far it seems to be working. I don't know if this has caused any other issues, but I'm running tests. And in case someone else is reading this I have to use cpanm (maybe a newer version?). Thank you again for your assistance. You have been an tremendous help and bailed me out, of course assuming I didn't mess up anything else. If for some reason this fails later I'll follow your instructions on using perlbrew instead. Thanks again! – Bugsta Oct 08 '15 at 18:16

0 Answers0