Steve Research has asked for the wisdom of the Perl Monks concerning the following question:

Hi, First post; I'm a Perl virgin not even a noob!

I am trying to get ENMTools_1.4.4.pl running on Ubuntu 15.04.

According to the docs I need Tk+ and Perl. How do I:
- Check the versions that i may already have?
- update/install the latest versions?
- launch the *.pl script?

I tried:
/usr/bin/perl ./ENMTools_1.4.4.pl

I currently get:
Can't locate Tkx.pm in @INC (you may need to install the Tkx module) ( +@INC contains: /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.20.2 /u +sr/local/share/perl/5.20.2 /usr/lib/i386-linux-gnu/perl5/5.20 /usr/sh +are/perl5 /usr/lib/i386-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr +/local/lib/site_perl .) at ./ENMTools.pl line 7. BEGIN failed--compilation aborted at ./ENMTools.pl line 7
Any ideas?
Steve

Replies are listed 'Best First'.
Re: ENMTools_1.4.4.pl on Ubuntu 15.04?
by stevieb (Canon) on Jun 24, 2016 at 11:12 UTC

    You already have perl installed, or else you would have gotten an Operating System error when you ran it. The way you're calling the script is correct.

    To check perl's version:

    perl -v This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-li +nux (with 1 registered patch, see perl -V for more detail) ...

    Upgrading (or otherwise mucking about in any way) your system perl is *highly* recommended against. I, personally have hosed a system or two in the past by doing this (same goes for system Python). You're on Linux, so I say take a look at Perlbrew. If you must upgrade your system perl, use Ubuntu's package manager, and do a complete backup/snapshot before you do.

    To both check if a module is installed, and get its version if it is:

    perl -MData::Dumper -E 'say Data::Dumper->VERSION' 2.160

    If the module isn't installed, you'll get a similar error to what you got:

    perl -MTkx -E 'say Tkx->VERSION' Can't locate Tkx.pm in @INC (you may need to install the Tkx module) ( +@INC contains: /home/spek/perl5/perlbrew/perls/perl-5.24.0/lib/site_p +erl/5.24.0/x86_64-linux /home/spek/perl5/perlbrew/perls/perl-5.24.0/l +ib/site_perl/5.24.0 /home/spek/perl5/perlbrew/perls/perl-5.24.0/lib/5 +.24.0/x86_64-linux /home/spek/perl5/perlbrew/perls/perl-5.24.0/lib/5. +24.0 .). BEGIN failed--compilation aborted.

    The -M flag is akin to having use Module::Name within a perl script.

    To install a module, use cpan or if it's installed on your system, cpanm:

    cpan install Tkx

    ...or:

    cpanm Tkx
      Thanks stevieb

      Perl seemed OK itself

      1.4.4$ perl -MData::Dumper -E 'say Data::Dumper->VERSION' 2.151_01


      Once I had installed cpanm I used:
      cpanm Tkx

      It opens and seems to work. So thanks guys at the PerlMonestry.
      Cheers
      Steve
Re: ENMTools_1.4.4.pl on Ubuntu 15.04?
by stevieb (Canon) on Jun 24, 2016 at 11:48 UTC

    Cross-posted at StackOverflow.

    It's ok to cross-post to different sites, but it is considered polite to inform all the locations you post at that you've done so. This way, there aren't wasted duplicate efforts by people who don't frequent all posting sites.

      Thanks and noted about the cross-posting.

      No offense or waste of effort intended. I literally hit my head on the edge of the desk as I fell asleep at 1AM having been up since 6AM the morning before. Not being able to get this to run was very frustrating!