Can't locate PDL/Graphics/Simple.pm - perl

I'm new to using PDL and after installing it under Ubuntu (12.04 LTS running on a Intel® Core™ i7-3630QM CPU # 2.40GHz × 8 as dual-boot with Windows 8.1)
I tried the first example given on First Steps with PDL but get an error message regarding PDL::Graphics::Simple as shown below. I'm guessing it might be something simple?
$ pdl
perlDL shell v1.357
...
Loaded PDL v2.007
Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended)
pdl> use PDL::Graphics::Simple
but get an error message:
Can't locate PDL/Graphics/Simple.pm in #INC (#INC contains: /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 70) line 5.
BEGIN failed--compilation aborted

PDL::Graphics::Simple comes in a separate distribution from the main PDL library. Just install it with cpan or your OS package manager and you should be good to go.

Related

Why do I get "Can't locate loadable object for module" even after installing the module?

Could anyone point me to possible causes of Perl not finding an installed module?
$ ll /usr/share/perl5/Unix/Processors.pm
-rw-r--r-- 1 root root 3.2K Sep 11 12:39 /usr/share/perl5/Unix/Processors.pm
Ok,
$ perldoc -l Unix::Processors
/usr/share/perl5/Unix/Processors.pm
Ok, but
$ perl -MUnix::Processors -e1
Can't locate loadable object for module Unix::Processors in #INC (#INC contains: /usr/lib/cegma /usr/share/mocat/src /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 -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
FIXED: I had put the compiled Processors.so next to the .pm when it should be in the auto directory.
The Unix::Processors module has an XS (C) component that has to be compiled and linked as part of the installation process. The error message Can't locate loadable object is referring to this component (a shared library) rather than the .pm module file itself
This is a symptom of a wrongly-installed module, and most often happens when the .pm file has been simply copied into place instead of being installed properly as described in perldoc perlmodinstall. It can also happen if the installation has been forced, regardless of any errors in the build and test phases.

"Compilation failed in require at /home/ubuntu/perl5/lib/perl5/App/DuckPAN/Cmd.pm line 22."

I can't seem to get duckpan to work. Here is the error I am receiving, any ideas?
Checking for latest App::DuckPAN ... 0.135
Checking for latest DDG Perl package... 0.120
Using the following DDG instant answers:
- DDG::Goodie::ABC (Words)
- DDG::Goodie::AltCalendars (Words)
- DDG::Goodie::Anagram (Words)
- DDG::Goodie::Ascii (Words)
- DDG::Goodie::AspectRatio (Words)
- DDG::Goodie::Atbash (Words)
- DDG::Goodie::Average (Words)
Can't locate Math/Int2Base.pm in #INC (#INC contains: lib /home/ubuntu/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int /home/ubuntu/perl5/lib/perl5 /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 lib/DDG/Goodie/Base.pm line 4.
BEGIN failed--compilation aborted at lib/DDG/Goodie/Base.pm line 4.
Compilation failed in require at /home/ubuntu/perl5/lib/perl5/App/DuckPAN/Cmd.pm line 22.
As #rutter mentioned, the problem is that you're missing a dependency for the Goodie package.
DuckPAN provides an easy way to install all the dependencies (which installed them via CPAN as rutter suggested), once you're in the root of your Goodie repo (zerclickinfo-goodie), run duckpan installdeps and this will install everything necessary to run duckpan server or duckpan query.
BTW, in the future it's best to report these issues in the relevant repo, in this case the DuckPAN repo: https://github.com/duckduckgo/p5-app-duckpan, as we check those daily.

Cloudstack api error: BEGIN failed--compilation aborted at sign.pl line 12

Error message:
Can't locate XML/Twig.pm in #INC (#INC contains: /usr/local/lib64/perl5 /usr/loc al/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/li b64/perl5 /usr/share/perl5 .) at sign.pl line 12.
BEGIN failed--compilation aborted at sign.pl line 12.
The error is due to a missing Perl module.
See this answer:
What's the easiest way to install a missing Perl module?
If you have SELinux running you may have to restore the security contexts for the web folder.
For instance:
restorecon -Rv /var/www/html

Perl library Error message every time after logging to a server

I will try to make my problem as clear as possible.
After logging to a server I get this message:
Last login: Sat Apr 13 02:52:11 2013 from this_and_that
Can't locate local/lib.pm in #INC (#INC contains: /.../perl5/lib/perl5/x86_64-linux-thread-multi /.../perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN failed--compilation aborted.
How can I fix this problem?
Check your shell startup files (e.g. ~/.bashrc). It seems that you have a command for bootstrapping local::lib there which throws the error.

Perl - Getting an error with Net/SSLeay.pm - I am trying to POST XML via HTTPS web service

I am trying to use Net/SSLeay.pm in Perl, code says use Net::SSLeay
Error message says the following -
Can't locate Net/SSLeay.pm in #INC (#INC contains: C:/Perl/site/lib C:/Perl/lib .) at test.pl line 7.
BEGIN failed--compilation aborted at test.pl line 7.
I installed SSLeay.pm via Perl Package Manager and verified it -
Crypt-SSLeay
OpenSSL support for LWP
Version: 0.57
Released: 2008-05-02
Author: David Landgren
CPAN: http://search.cpan.org/dist/Crypt-SSLeay-0.57/
Installed files:
C:/Perl/lib/Crypt/SSLeay.pm
C:/Perl/lib/Crypt/SSLeay/CTX.pm
C:/Perl/lib/Crypt/SSLeay/Conn.pm
C:/Perl/lib/Crypt/SSLeay/Err.pm
C:/Perl/lib/Crypt/SSLeay/MainContext.pm
C:/Perl/lib/Crypt/SSLeay/X509.pm
C:/Perl/lib/Net/SSL.pm
C:/Perl/lib/auto/Crypt/SSLeay/.packlist
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.bs
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.dll
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.exp
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.lib
I am unsure as to why my script does not find it, any help would be appreciated.
Crypt-SSLeay and Net-SSLeay are two different CPAN distributions. If you want to use Net::SSLeay, install "Net-SSLeay" ppm distribution.