Can't load '/Compress/Raw/Zlib/Zlib.so' - perl

I am trying to run Variant effect predictor perl script (by ensembl) and I am getting this error:
Testing VEP script
ERROR: Testing VEP script failed with the following error
Can't load '/home/sahel/perl5/lib/perl5/x86_64-linux/auto/Compress/Raw/Zlib/Zlib.so' for module Compress::Raw::Zlib: /home/sahel/perl5/lib/perl5/x86_64-linux/auto/Compress/Raw/Zlib/Zlib.so: undefined symbol: PL_unitcheckav at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
at /home/sahel/perl5/lib/perl5/Compress/Zlib.pm line 11
Compilation failed in require at /home/sahel/perl5/lib/perl5/Compress/Zlib.pm line 11.
BEGIN failed--compilation aborted at /home/sahel/perl5/lib/perl5/Compress/Zlib.pm line 11.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/ProteinFunctionPredictionMatrix.pm line 73.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/ProteinFunctionPredictionMatrix.pm line 73.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariationAllele.pm line 65.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariationAllele.pm line 65.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariation.pm line 57.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/TranscriptVariation.pm line 57.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/DBSQL/TranscriptVariationAdaptor.pm line 68.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/DBSQL/TranscriptVariationAdaptor.pm line 68.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/VariationFeature.pm line 105.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/VariationFeature.pm line 105.
Compilation failed in require at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/Utils/VEP.pm line 52.
BEGIN failed--compilation aborted at /projects/sahel_proj/localperl/Bio/EnsEMBL/Variation/Utils/VEP.pm line 52.
Compilation failed in require at variant_effect_predictor.pl line 57.
BEGIN failed--compilation aborted at variant_effect_predictor.pl line 57.
I have installed all required modules by cpan and set the path to the modules by:
echo 'eval `/projects/sahel_proj/localperl/bin/perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile
Compress::Raw::Zlib and Compress::Zlib seem to be successfully installed:
./bin/perl -e 'use Compress::Raw::Zlib;'
./bin/perl -e 'use Compress::Zlib;'
So I can not think of what could be wrong and could not find any thing online...
This my first experience working with perl ever :( , any help would be appreciated...
Thank you so much

There seems to be a Perl version mismatch. The signs point to: The .so you are loading was built using one version of Perl and it's being loaded by an incompatible version of Perl.
I suspect your testing is done with one perl (the one used to install the modules), while the actual program is being run with the another perl.
Now you know why I can't fathom why people think INSTALL_BASE aka --install_base is a good idea. Sure, the directory structure is prettier, but it causes these problems! You're using INSTALL_BASE aka --install_base (a way to tell Makefile.PL and Build.PL where to install modules) via local::lib.
Solution 1.
Run your script using the same perl that you used to install the modules.
Solution 2.
Get rid of the directory in which local::lib installed your modules and reinstall them without using local::lib:
perl Makefile.PL PREFIX=~ LIB=~/lib/perl5
make
make test
make install
or
perl Build.PL --prefix ~ --lib ~/lib/perl5
./Build
./Build test
./Build install
If you do the above using both perl, version-specific modules will be available to both perl. If you do the above using only one perl, version-specific modules will only be available to that perl. No conflicts.
(You can use cpan by configuring it to use the above commands.)
Don't forget to tell perl where to locate your modules. In your login script,
export PERL5LIB=~/lib/perl5

Related

Problem installing Tk module perl in MacOS catalina

I got the following errors while installind Tk module from perl in MacOS catalina 10.15.6
cpan install Tk
And the error I get
Cannot find '/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/perl.h' have you installed /usr/bin/perl?
Compilation failed in require at Makefile.PL line 37.
BEGIN failed--compilation aborted at Makefile.PL line 39.
Warning: No success on command[/usr/bin/perl Makefile.PL]
SREZIC/Tk-804.035.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Could you please help me know what's happening here?

Is version.pm available in CPAN any longer?

I am trying to find the Perl Module version.pm to fix the error below I am receiving while trying to install module CPAN-Meta-Requirements-2.133. But I don't see version.pm, the only one I see is Version.PM which is obviously not the one Perl is looking for. Can anyone point to where I can get this version or how I can fix this dependency if version.pm is no longer available?
Perl Version:
v5.16.3
OS:
GNU/Linux
x86_64 x86_64 x86_64
Error:
Can't locate version.pm in #INC (#INC contains: # Line breaks added
/root/CPAN-Meta-Requirements-2.133/blib/lib # for readability
/root/CPAN-Meta-Requirements-2.133/blib/arch
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
.) at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
BEGIN failed--compilation aborted at /root/CPAN-Meta-Requirements-2.133/blib/lib/CPAN/Meta/Requirements.pm line 48.
Compilation failed in require at t/accepts.t line 4.
BEGIN failed--compilation aborted at t/accepts.t line 4.
t/accepts.t ............ Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
version has come with Perl since Perl 5.10, so it's weird that you would have to install it.
$ corelist version
version was first released with perl v5.9.0
But version is also available on CPAN in its own distribution in order to allow people to upgrade version without upgrading Perl.
So you may indeed install it as any other module.
cpan version
OK, so first: your link is to CPAN/Version.pm. This is very different than version.pm. Directory names and the path relative to Perl's include directory are very important to Perl, and putting a .pm file in the wrong location relative to the include path can break Perl pretty badly.
Second: because of that, never install Perl modules manually. Use cpanm instead:
curl -L https://cpanmin.us | perl - --sudo App::cpanminus # Omit --sudo if your perl isn't installed as root
cpanm version
Third: the version.pm that you want is this one: https://metacpan.org/pod/distribution/version/lib/version.pod, in the JPEACOCK/version-0.9912 distribution.

MEAD (Perl Package) Installation

I am trying to install MEAD http://www.summarization.com/mead/ for text summarization, but when I try to run a basic example from the bin folder
./mead.pl GA3
I get the error below:
Cannot locate loadable object for module XML::Parser::Expat in #INC (#INC contains: mead/bin/../lib mead/bin/../lib/arch /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at mead/bin/../lib/XML/Parser.pm line 15
Compilation failed in require at mead/bin/../lib/XML/Parser.pm line 15.
BEGIN failed--compilation aborted at mead/bin/../lib/XML/Parser.pm line 19.
Compilation failed in require at /mead/bin/../lib/MEAD/Cluster.pm line 16.
BEGIN failed--compilation aborted at mead/bin/../lib/MEAD/Cluster.pm line 16.
Compilation failed in require at ./mead.pl line 29.
BEGIN failed--compilation aborted at ./mead.pl line 29.
Strange enough, I already have expat installed. I am wondering, what could be the cause of this error?
I highly recommend you reading mead documentation before starting. In page 7 of this document, it is pointed out the required perl libraries for mead. You can find required perl library under path/mead/external. Install all libraries under the external directory, it will run without any problems.
Required Libraries:
Perl 5.5 or above
XML::Parser
Expat
XML::Writer
XML::TreeBuilder
Text::Iconv
etc.

Can not install Apache2::Const module

I have installed Apache 2.2.25 with mod_perl 2.0.7 running on Debian 7.1.0. During its installation mod_perl had to install module named Apache2::Const, but it didn't. mod_perl have installed modules from the same group, e.g. Apache2::Access, Apache2::Connection, Apache2::RequestUtil.
So when I use this command (i /Apache2::Const/) in cpan shell it outputs following:
cpan[3]> i /Apache2::Const/
Module id = Apache2::ConstantsTable
CPAN_USERID PHRED (Fred Moyer <fred#redhotpenguin.com>)
CPAN_VERSION undef
CPAN_FILE P/PH/PHRED/mod_perl-2.0.8.tar.gz
UPLOAD_DATE 2013-04-18
INST_FILE (not installed)
And when I use this command (install Apache2::Const):
cpan[4]> install Apache2::Const
Warning: Cannot install Apache2::Const, don't know what it is.
Try the command
i /Apache2::Const/
to find objects with matching identifiers.
I've tried to run:
install Apache2::ConstantsTable
But it didn't help.
Also, when I run following script:
perl -e "use v5.14.2; use Apache2::Const"
it outputs:
Not a CODE reference at /usr/lib/perl/5.14/DynaLoader.pm line 207.
END failed--call queue aborted at /usr/local/lib/perl/5.14.2/ModPerl/Const.pm line 207.
Compilation failed in require at /usr/local/lib/perl/5.14.2/Apache2/Const.pm line 18.
BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Apache2/Const.pm line 18.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
I tried to install this module manually (via Makefile.PL) from mod_perl package. I also tried to reinstall mod_perl. Nothing helped.
All the other Apache2::* modules works correctly.
I really need to install Apache2::Const module. Thanks for your replies.
Solved long time ago by installing all this stuff from debian package. I was hard noob in linux when I posted the question.

Why does Perl say that it can't find my module?

I wanted to play with XML::Rabbit, however I've got a problem even with the simplest code. I managed to strip this into one line.
In a simple file, I use
use Class::Load;
and then:
perl test_optlist.pl
Can't locate Data/OptList.pm in #INC (you may need to install the Data::OptList module) (#INC contains: [CUT]) at /home/szymon/perl5/lib/perl5/Class/Load.pm line 8.
BEGIN failed--compilation aborted at /home/szymon/perl5/lib/perl5/Class/Load.pm line 8.
Compilation failed in require at test_optlist.pl line 2.
BEGIN failed--compilation aborted at test_optlist.pl line 2.
so let's install it:
$ cpanm Data::OptList
Data::OptList is up to date. (0.107)
Perl version:
This is perl 5, version 17, subversion 8 (v5.17.8) built for x86_64-linux
Where is the problem?
You're surely using another perl's cpanm. Do
perlbrew install-cpanm
to install a version of cpanm under perlbrew's control, make sure this new cpanm is the one found first in the path (though I suspect it will be), then try again