Problem installing Tk module perl in MacOS catalina - perl

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?

Related

cpan "Set::IntervalTree " or "Algorithm::ExpectationMaximization" doesn't work - I explain below the complete error log

Here I explain more about troubles installing some Perl libraries:
trouble installing Set::IntervalTree
** I installed g++ - still the same issue
** I installed miniconda, and tried to conda the package - still having the same issue
here are the complete error logs:
** I copy part of it - as it is too long!
cpan Set::IntervalTree
Can't locate ExtUtils/CppGuess.pm in #INC (#INC contains: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at Makefile.PL line 11.
BEGIN failed--compilation aborted at Makefile.PL line 11.
Warning: No success on command[C:\Strawberry\perl\bin\perl.exe Makefile.PL]
SLOYD/Set-IntervalTree-0.12.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
I face similar problem trying to cpan Algorithm::ExpectationMaximization
one dependency not OK (Math::GSL); additionally test harness failed
C:\Strawberry\c\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports AVIKAK/Algorithm-ExpectationMaximization-1.22.tar.gz
Running make install
make test had returned bad status, won't install without force
Suggestions:
Create a gist of the full log and post the link to it here. If you are philosophically opposed to GitHub, I believe there are other places you could post, but I don't know how permanent they are.
cpan and its related programs all (I believe) have options to automatically install dependencies which you do not already have installed. I wonder if deleting you cpan config file and reconfiguring to make sure that that option is set would help.
If the log of the run does not show it, make sure to add the output of perl -V to the gist. Perl version info helps in these situations.

OS X CPAN Perl module installation issue

I'm trying to install Perl module MediaWiki::API using CPAN on OS X:
sudo cpan MediaWiki::API Password:
Reading '/Users/qazwsx/.cpan/Metadata'
Database was generated on Mon, 13 Jul 2015 20:53:32 GMT
Running install for module 'MediaWiki::API'
Running make for E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Checksum for /Users/qazwsx/.cpan/sources/authors/id/E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz ok
sh: /opt/local/bin/gzip: No such file or directory
Package seems to come without Makefile.PL.
(The test -f "/Users/qazwsx/.cpan/build/EXOBUZZ-iwzBiH/Makefile.PL" returned false.)
Writing one on our own (setting NAME to MediaWikiAPI)
CPAN.pm: Building E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Writing Makefile for MediaWikiAPI
Writing MYMETA.yml and MYMETA.json
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
No tests defined for MediaWikiAPI extension.
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make test -- OK
Running make install
Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make install -- OK
This is a step of installing Git-Mediawiki (see https://github.com/moy/Git-Mediawiki/wiki/User-manual). However, after all the installation steps, the first git command reports that MediaWiki::API module isn't available:
git pull
Can't locate MediaWiki/API.pm in #INC (you may need to install the MediaWiki::API module) (#INC contains: /Users/qazwsx/WorkSpace-X4430/git/perl /Users/qazwsx/WorkSpace-X4430/git/contrib/mw-to-git /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
I wonder if my installation method for the Perl module is correct. One thing strikes out as odd is the error
sh: /opt/local/bin/gzip: No such file or directory
I use Homebrew with standard paths, so the gzip binary is at /usr/local/bin/gzip. But I don't know if or where to fix it. It appears to be some search paths issue but I don't know how to fix it.
There might be something wrong with your ~/.cpan, the configuration for CPAN. You can try
# Re-install cpan
brew doctor
brew update
brew install cpan
# Remove or back up ~/.cpan
mv ~/.cpan ~/.cpan.bak
# Re-initialize ~/.cpan
cpan config
# Try installing the Perl module again
sudo cpan install MediaWiki::API

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.

How to install Padre on ActivePerl 5.16.2?

I need to install Padre on ActivePerl 5.16.2. But there are no Padre ppm packages and
cpan Padre says:
MDOOTSON/Alien-wxWidgets-0.64.tar.gz
C:\Perl\site\bin\dmake.exe -- NOT OK
CPAN: YAML::XS loaded ok (v0.38)
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Running make for P/PL/PLAVEN/Padre-0.98.tar.gz
Warning: Prerequisite 'Alien::wxWidgets => 0.62' for 'PLAVEN/Padre-0.98.tar.gz' failed when processing 'MDOOTSON/Alien-wxWidgets-0.64.tar
CPAN: Time::HiRes loaded ok (v1.9725)
CPAN.pm: Building P/PL/PLAVEN/Padre-0.98.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Can't locate Alien/wxWidgets.pm in #INC (#INC contains: inc privinc C:\Perl\dbg C:/Perl/site/lib C:/Perl/lib .) at Makefile.PL line 52.
BEGIN failed--compilation aborted at Makefile.PL line 52.
Warning: No success on command[C:\Perl\bin\perl.exe Makefile.PL INSTALLDIRS=site]
PLAVEN/Padre-0.98.tar.gz
C:\Perl\bin\perl.exe Makefile.PL INSTALLDIRS=site -- 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
tl;dr Padre for ActivePerl 5.16 has not been released yet.
The following contents are just me trying to make it work.
First I tried:
cpan Padre
I did this three times, but "dmake.exe" always failed.
There was no reference about this error on the Internet.
Secondly I tried PPM with an article in Padre Wiki:
ppm rep add wxperl http://www.wxperl.co.uk/repository
ppm install Alien-wxWidgets
ppm install Wx
ppm install Padre
but the very last line claimed:
ppm install failed: Can't find any package that provides Padre
Finally I couldn't help talking to the Padre developers:
So, apparently we have nothing to do but wait for them to develop it.
Or you can participate to the development, of course!
This post should help: Installation instructions for Wx (wxWidgets fomerly wxWindows) using ActivePerl

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

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