I am trying to run a topology generation tool (http://informatique.umons.ac.be/networks/igen/) on linux where I need to install plenty of modules of perl.
For now, I have already installed CPAN. This tool requires a Statistics::Basic module which I also installed successfully.
However, after installing this module, the tool requires a package in this Statistics::Basic module. Here are the hints appeared in the command line:
Can't locate Statistics/Basic/CoVariance.pm in #INC (you may need to install the Statistics::Basic::CoVariance module) (#INC contains: /usr/local/share/perl/5.18.2/ /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .)
I get confused on this request since it is already included in the Statistics::Basic module. Even though I tried to install it independently, the cpan responded this:
cpan[1]> install Statistics::Basic::CoVariance
Warning: Cannot install Statistics::Basic::CoVariance, don't know what it is.
Does anyone know how to fix it? I am new to perl so I don't know how to make it work. Thx.
You need to replace the capital V with a small v in a couple of files and you need also some other modifications. You can find here a guide on how to make IGen-0.15 work again.
Related
I just set up an Ubuntu 16.04 box and am trying to get some Perl modules installed. I launched CPAN, and it went through the automatic config procedure. At the end it dumped a few questionable messages:
Couldn't untar local-lib-2.000019.tar: 'Cannot allocate memory'
'YAML' not installed, will not store persistent state
HAARG/local-lib-2.000019.tar.gz
Had problems unarchiving. Please build manually
Can't locate local/lib.pm in #INC (you may need to install the local::lib module) (#INC contains: /home/steve/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /home/steve/waternow) at /usr/share/perl/5.22/CPAN/FirstTime.pm line 1347.
When I restarted it, it came up with the CPAN shell command line like nothing is wrong. Did it get configured correctly, or is there something else I need to do? I'm not a Lunix noob but not an expert either.
Also are there any better options for installing Perl modules on Ubuntu besides CPAN (for example like Activestate Perl Package Manager on Windows)? I've never been too fond of CPAN because of experiences like this.
I'm on centos6.7 and i need to install snmptt to get all SNMP traps and log them into Nagios. I made it work yesterday, but today, not the same story...
I've run the yum install perl-Net-SNMP command, it told me that the package is already installed (from epel)
I've enabled the module on the snmptt.ini and now, when i'm trying to run it, I've a failed message :
root#SLINUX01:[~]$service snmptt restart
Stopping snmptt: [FAILED]
Starting snmptt: Can't locate SNMP.pm in #INC (#INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at (eval 12) line 1.
Could not load the Perl module SNMP! If net_snmp_perl_enable is
enabled then the SNMP module is required. Please see snmptt.html
for system requirements. Note: SNMPTT uses the Net-SNMP package's
SNMP module, NOT the CPAN Net::SNMP module!
died at /usr/sbin/snmptt line 426.
Suggestions ?
Found the solution : just install a different package :
yum install net-snmp-perl =/= yum install perl-Net-SNMP
The provided solution also worked for SNMPTT on Oracle Linux 7.5.
yum install net-snmp-perl
worked for me.
I am trying to create a sample web service using Dancer. I am using Ubuntu 10.04 as my OS. I installed Dancer and dependencies using CPAN client and can also do
dancer -a MyApp
However, when I try to run the app.pl file, the code throws an error saying YAML.pm not found. I am sure this file was downloaded when the dependencies were installed. A have a few questions :-
1. Where does CPAN put all these files which were downloaded? How are they included in the #INC?
2. For using Dancer, do I have to manually include all the files in #INC?
I tried to create a very simple perl dancer app the says hello world by including the Dancer.pm path in #INC. However, it keeps failing because of some or the other dependency missing.
Help me in understanding what am I doing wrong?
cpan should put files in one of the path from #INC
perl -E '$"="\n"; say "#INC"'
Output on my system:
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl
.
And cpan puts files in /usr/local/share/perl/5.14.2
Because this path exists in #INC you shouldn't include it manually. And what about Dancer, YAML is not hard dependency for it, because of this it wasn't installed.
I follow the book "The Definitive Guide to Catalyst". Now when I run the command "script/lolcatalyst_lite_create.pl view Web TT", I get as follows
exists "/home/hengaini/LolCatalyst-Lite/script/../lib/LolCatalyst/Lite/View"
exists "/home/hengaini/LolCatalyst-Lite/script/../t"
Couldn't load helper "Catalyst::Helper::View::TT", "Can't locate Catalyst/Helper/View/TT.pm >in #INC (#INC contains: /home/hengaini/LolCatalyst-Lite/script/../lib /etc/perl /usr/local /lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 338) line 2.
question:
1.Is Catalyst still popular? Every web framework says good;
2.How to solve above problem?
Thanks!
1 - Yes, at least with me :-)
Catalyst is well maintianed. There is no new Perl framework aimed at replacing Catalyst.
2 - Install the missing module:
sudo cpan Catalyst::Helper::View::TT
Make sure everything is installed
sudo cpan Catalyst::Runtime
sudo cpan Catalyst::Devel
Yes, Catalyst is quite popular, and has a very active community behind it.
But the issue you've run into there isn't Catalyst specific. It looks like Catalyst::Helper::View::TT isn't installed on your server.
Try installing it from CPAN and see how you go. You'll also need to install Template (Template Toolkit) if you haven't already.
(If you've gotten as far as you have, I guess you know how to install from CPAN!)
I'm trying to add an check_esx3.pl script to my icinga. But trying to execute the script
./check_esx3.pl
Gives me the following error:
Can't locate Nagios/Plugin.pm in #INC (#INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at ./check_esx3.pl line 31. BEGIN
failed--compilation aborted at ./check_esx3.pl line 31.
I've been looking around and googling, but I've not been able to find any solution.
You need to install the Nagios::Plugin Perl module.
When you build the Nagios Plugins package from https://www.nagios-plugins.org, one of the configure options is --enable-perl-modules. It will build the Nagios::Plugin:* modules (since it has several modules included that need them), and install them to your system Perl library directory when you run 'make install' as root.
You can also go directly to the source and install the modules from CPAN, by running the command cpan Nagios::Plugins from the command line, also as root. You could possibly run these as the icinga or nagios user, but there's no guarantee they'll get installed into the proper places unless you've done some work beforehand to define PERL5LIB (which is way out of the scope of this answer) and done a bit of hackery in your startup scripts that define a special PERL5LIB for the icinga/nagios process on startup.