What to do for Math::Pari in cpan terminal - perl

I found this one relevant question on problems with installing Math::Pari, here. Except this is for shell and I have cpanm. I downloaded the latest version of Pari, Pari 2-7-6. Where should I extract the files in C:\Program Files (x86)\Pari-2-7-6 to install Math::Pari in perl (not in cpan shell however) successfully? Thanks in advance.
C:\Users\Jlinne\Documents> cpanm Math::Pari
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080900.zip ... OK
Configuring Math-Pari-2.01080900 ... N/A
! Configure failed for Math-Pari-2.01080900. See C:\Users\Jlinne\.cpanm\work\1476648581.10216\build.log for details.

Here is an easy way on Windows:
Download and extract the module: https://metacpan.org/pod/Math::Pari
cd into the directory you created when extracting
perl Makefile.PL force_download <- this downloads things to the right place
dmake
dmake install

Related

Cannot build Perl libgd on Mac Perlbrew environment

I was using Mac OS 12 and Perlbrew with Perl 5.36.
When I install GD using either CPAN or cpanm I get the following error:
cpanm (App::cpanminus) 1.7046 on perl 5.036000 built for darwin-2level
Work directory is /Users/mjb/.cpanm/work/1673722431.48328
You have make /usr/bin/make
You have LWP 6.67
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
You have /usr/bin/unzip
Searching install () on cpanmetadb ...
install is up to date. (0.01)
Searching GD () on cpanmetadb ...
--> Working on GD
Fetching http://www.cpan.org/authors/id/R/RU/RURBAN/GD-2.76.tar.gz
-> OK
Unpacking GD-2.76.tar.gz
Entering GD-2.76
Checking configure dependencies from META.json
Checking if you have ExtUtils::Constant 0.22 ... Yes (0.25)
Checking if you have ExtUtils::PkgConfig 0 ... Yes (1.16)
Configuring GD-2.76
Running Makefile.PL
Notice: Type perl Makefile.PL -h for command-line option summary.
Package gdlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdlib.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gdlib' found
at Makefile.PL line 530.
*** can not find package gdlib
*** check that it is properly installed and available in PKG_CONFIG_PATH
at Makefile.PL line 530.
-> N/A
-> FAIL Configure failed for GD-2.76. See /Users/mjb/.cpanm/work/1673722431.48328/build.log for details.
The above is the contents of build.log. I'm not sure how to investigate further or fix it.
Previously I had Perl's GD install and build using the system Perl. I also have libgd installed from Homebrew and I included /usr/local/lib in the env var PKG_CONFIG_PATH. Still no avail.
Would appreciate help as I rely upon GD for my personal projects. Thanks.
Found it... something (probably me botching my .zshrc) had unset my $PKG_CONFIG_PATH!
After finding out what pkg-config was and scouring my drive for any telling collection of .pc files, I found gdlib.pc under /usr/local/lib/pkgconfig/gdlib.pc.
Then I simply did an export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ and reran the installation. Perl's GD built and installed without grumbling.
A pernanment solution will be to add the above line to your ~/.zshrc.

Can't install Perl module Locale::gettext under Windows. (Library dependency problem.)

Community!
I have a problem with the module Locale::gettext installation, used it for all my Perl projects.
Could you help me?
I can't install the module under Windows. What I did:
Downloaded and installed Citrus Perl.
Downloaded and installed libintl to C:\GnuWin32:
https://altushost-swe.dl.sourceforge.net/project/gnuwin32/libintl/0.14.4/libintl-0.14.4.exe
Tried to install the Locale:gettext:
> cpan -i Locale::gettext
OR
C:\perl\cpan\build\Locale-gettext-1.07-LlB4BJ>perl Makefile.PL INC="-IC:\\GnuWin32\\include" LIBS="-LC:\\GnuWin32\\libs"
And it outputs:
checking for gettext... no
checking for gettext in -lintl... no
Folder C:\GnuWin32\lib\ contains libintl.def, libintl.dll.a, libintl.lib, libintl-bcc.lib.
Folder C:\GnuWin32\bin\ contains libintl3.dll.
Do you have any thoughts why this error happens?
Thank you.

Unable to install Math::Pari module

I am trying to install Crypt::Random module, a cryptographically secure random number generator, and says it requires Math::Pari 2.001802, which is not availible from cpan.org, but says it is available from this other URL, which does not work. I tried to install them both anyway and encountered this problem:
C:\Users\Jlinne\Documents> cpanm Crypt::Random
--> Working on Crypt::Random
Fetching http://www.cpan.org/authors/id/V/VI/VIPUL/Crypt-Random-1.25.tar.gz ... OK
Configuring Crypt-Random-1.25 ... OK
==> Found dependencies: Math::Pari
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080900.zip ... OK
Configuring Math-Pari-2.01080900 ... N/A
! Configure failed for Math-Pari-2.01080900. See C:\Users\Jlinne\.cpanm\work\1476250290.12460\build.log for details.
! Installing the dependencies failed: Module 'Math::Pari' is not installed
! Bailing out the installation for Crypt-Random-1.25.
C:\Users\Jlinne\Documents> cpanm Math::Pari
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080900.zip ... OK
Configuring Math-Pari-2.01080900 ... N/A
! Configure failed for Math-Pari-2.01080900. See C:\Users\Jlinne\.cpanm\work\1476250325.1340\build.log for details.
The build.log does not help me either, any other possible ways to install this module successfully? Thanks.
You will have to share the build.log file. Without that we cannot check what caused the failure.
BTW for Math::Pari you need PARI library. Starting from version 2.0, this module comes without a PARI library included.
Since you are trying to install Math-Pari-2.01080900, therefore you will first have to install PARI library.
Get it from http://pari.math.u-bordeaux.fr/download.html
If you're ok with using 32 bit Perl, you could use 32 bit Strawberry Perl, which already has both Math::Pari and Crypt::Random modules installed.
Unfortunately the 64 bit versions of Strawberry Perl do not include either of these modules. In that case, you'll have to follow the suggestion from Chankey Pathak about installing the PARI library in order to install the Math::Pari module.

Error while Installing Math::Pari

I'm trying to install Math::Pari module but getting error.
I'm installing on Windows Server 2012R2, I've Strawberry perl v5.18.4.1 32-bit currently installed on it.
Actually Math::Pari is dependency for Net::SSH::W32Perl and I want to install that module.
Following is the error log. Please Give me step by step installation procedure.
cpanm (App::cpanminus) 1.7039 on perl 5.018004 built for MSWin32-x64-multi-thread
Work directory is C:\Users\script/.cpanm/work/1438929213.2276
You have make C:\strawberry\c\bin\dmake.exe
You have LWP 6.08
Falling back to Archive::Tar 2.02
Searching Math::Pari () on cpanmetadb ...
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.010808.zip
-> OK
Unpacking Math-Pari-2.010808.zip
Entering Math-Pari-2.010808/
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.98)
Configuring Math-Pari-2.010808
Running Makefile.PL
Did not find GP/PARI build directory around.
Apparently, you are running a 64-bit Perl built with MicroSoft's compilers.
GP/PARI (at least the versions I know how to work with, 2.1.* and 2.3.*)
cannot be built in this environment. I won't auto-download GP/PARI.
If you believe that this message is printed erroneously, please report
(see files README and INSTALL), and put force_download on the command line:
perl Makefile.PL force_download
One can rerun Makefile.PL after fetching GP/PARI archive (e.g., pari-2.1.7.tgz,
or pari-2.3.4.tar.gz) manually to the current directory, or a (grand)parent
directory of the current directory.
[Keep in mind that the numbers "inside version" of Math::Pari module
correspond to the last versions of GP/PARI it was tested with (additionally,
2.0108* works best with the last 2.1.* version, 2.1.7).
As an alternative to having archive in CWD or its (grand)parent, specify
pari_tgz=PATH_TO_TAR_GZ
option to Makefile.PL.
There is no need to extract the archive, or build GP/PARI; but if you
have it extracted [and patched, if needed], you may specify
paridir=PATH_TO_DIST_DIR
option to Makefile.PL instead of `pari_tgz'. However, in this case
the files WON'T be auto-patched.
As a last-resort solution, there is also a possibility to use an already
compiled PARI library. See the documentation in README and INSTALL files.]
Could not find GP/PARI build directory, please run Makefile.PL
with paridir=/directory option.
-> N/A
-> FAIL Configure failed for Math-Pari-2.010808. See C:\Users\script\.cpanm\work\1438929213.2276\build.log for details.
I thought I'd add a note for anyone coming here as a result of a Google search after their own Math::Pari install fails under Strawberry Perl.
Here is what worked for me (Strawberry 5.22):
A. from the cpan shell, tried to install Math::Pari. this failed
B. Downloaded pari-2.1.7 and placed the extracted folder pari-2.1.7 in the cpan build folder that was created in (0). This is found, by default, in C:\Strawberry\cpan\build
C.perl Makefile.PL Configure machine=none
D. dmake
E. dmake install
It basically means that 64 bit versions of perl are not supported. It also means that if you're sure that you're running a 32 bit version incorrectly detected as 64 bit, you can try opening a command line and then doing
cd C:\Users\script\.cpanm\work\1438929213.2276\
perl Makefile.PL force_download

Need help for installing LDAP in unix

I am following the below procedure for installing LDAP in unix
1.tar -xzf perl-ldap-0.43.tar.gz
2.cd perl-ldap-0.43
3.perl MakeFile.PL
I am getting below message
* Checking for Perl dependencies...
We have to reconfigure CPAN.pm due to following uninitialized parameters:
cpan_home, keep_source_where, build_dir, build_cache, scan_cache, index_expire, gzip, tar, unzip, make, pager, makepl_arg, make_arg, make_install_arg, urllist, inhibit_startup_message, ftp_proxy, http_proxy, no_proxy, prerequisites_policy, cache_metadata
CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.
If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)
Are you ready for manual configuration? [yes]
How to install without CPAN and what are the dependent modules required to install Ldap?
Can anyone suggest me the standard process of installation.
Thanks In Advance
I assume that by perl-ldap-0.43.tar.gz you are trying to install Net::LDAP
How to install without CPAN?
CPAN is the recommended way of installing Perl modules. You have to configure it just once, after that if you need to install any Perl module you can just type the below.
$ cpan ModuleName like in your case instead of downloading, untaring and running makefile you can just do:
$ cpan Net::LDAP
What are the dependent modules required to install Ldap?
One more advantage of using CPAN is you don't have to care about dependencies. CPAN will install dependencies automatically if you ask it to do so. Do it by
$ perl -MCPAN -e shell
cpan[1]> o conf prerequisites_policy follow
cpan[2]> o conf commit
exit
Or just use App::cpanminus and run
$ cpanm Net::LDAP it will install the module with all its dependencies.
Also check out Perl LDAP page.
Edit: Based on your answer
You will get some errors like above, you will have to see the error log, check the Module which is missing, then go to CPAN and download that module's tar.gz and then do the same steps as you were doing, like untaring, and running Makefile. You will have to do this unless all of your dependencies are installed.
Can we ignore warnings while installing perl modules?
I have installed ExtUtils-MakeMaker-6.98.tar.gz by ignoring below warnings
Using included version of ExtUtils::Install (1.54) as it is newer than the installed version (1.33).
Using included version of CPAN::Meta::YAML (0.008) because it is not already installed.
Using included version of JSON::PP::Compat5006 (1.09) because it is not already installed.
Using included version of ExtUtils::Manifest (1.60) as it is newer than the installed version (1.46).
Using included version of version (0.88) because it is not already installed.
Using included version of ExtUtils::Command (1.16) as it is newer than the installed version (1.09).
Using included version of CPAN::Meta (2.120351) because it is not already installed.
Using included version of JSON::PP (2.27203) because it is not already installed.
Using included version of File::Temp (0.22) as it is newer than the installed version (0.16).
Using included version of Parse::CPAN::Meta (1.4405) because it is not already installed.
Using included version of File::Copy::Recursive (0.38) because it is not already installed.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
't/liblist/win32/di
't/liblist/win32/space
Please inform the author.
Generating a Unix-style Makefile
Writing Makefile for ExtUtils::MakeMaker
Writing MYMETA.yml and MYMETA.json**
But I'm able to install successfully. Will it create any problems in future?