How to install GD library with Strawberry Perl - perl

I am attempting to install the GD library using Strawberry perl and GnuWin32. However, when I enter "install GD" in the CPAN shell, the following message appears:
'gdlib-config' is not recognized as an internal or external command, operable program or batch file. **UNRECOVERABLE ERROR** Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
I believe perl is having difficulty locating the GD library installed at C:\Program Files\GnuWin32\bin, but I am not sure how to fix this. I am still new to perl, so any help would be appreciated.

Your error is confirmed on cpan testers.
Looks like you need to manually compile and install gdlib.

If you make sure that C:\Program Files\GnuWin32\bin is in your PATH variable ($PATH? %PATH%? I'm not sure which one GnuWin32 uses) before you start CPAN, the installer should find the gdlib-config program and you will at least be able to get through that step of the installation.

Run 'Makefile.PL' manually. It will show you list of parameters. Try running it with parameter "-lib_gd_path".
GD may be included in Strawberry 5.10.1.0 beta. A good place to ask is irc://irc.perl.org/#win32 IRC channel.

Which version of Strawberry Perl are you using? I am using the one bundled with Padre and GD came with it:
C:\opt> perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread
uname='Win32 padre 5.10.0.7.beta_1 #1 20 i386'
...
And:
C:\opt> perl -MGD -Mfeature=say -e "say $GD::VERSION"
2.44

Related

BOBTFISH/Task-Catalyst installation error

I am using CentOS 5.7 perl 5.14.2. While installing CPAN module Task::Catalyst
cpan -i Task::Catalyst
i am getting the error:
http://pastebin.com/N1p1UMAH
3 modules Catalyst::Authentication::Credential::HTTP, Catalyst::View::Email and Catalyst::Plugin::Session::Store::DBIC are giving installation errors
When i tried to manually install the modules , say Catalyst::View::Email
i downloaded the tar file, and then after running the ./Makefile.pl
i got the error
http://pastebin.com/ZSDLtqii
Please suggest?
Makefile.PL is just a perl script, that is generally invoked as perl Makefile.PL, and its output is a regular 'make' style makefile.
Have a look at its contents - perhaps it's been corrupted somehow. In the case of C::V::Email, it should be 39 lines long, and look exactly like this.

Perl Install PAR:Packer Problems

My perl version is 5.16.2 on my Windows 7 64bit, I failed to install PAR:Packer. I tried active perl and strawberry perl , both got the same error. Can you please give me some suggestion. Below is my experience:
I tried ppm install PAR:Packer, version 1.013, But when I use pp, I got the error:
Perl lib version (5.16.2) doesn't match executable version (v5.16.0).
I also tried cpan install PAR:Packer, version 1.014. But I got the error during installation. The pop up window says: par.exe has stopped working. Then command prompt got the error:
C:\Perl64\bin\perl.exe -Mblib run_with_inc.pl par.exe -q -B -Oparldyn.exe
system(par.exe -I C:\Users\PAR-Packer-1.014\blib\arch -I C:\Users\PAR-Packer-1.014\blib\lib - IC:/Perl64/site/lib -IC:/Perl64/lib -I. -q -B -Oparldyn.exe) failed:
dmake.exe: Error code 255, while making 'parldyn.exe'
dmake.exe: Error code 255, while making 'subdirs'
I have googled extensively, but as of yet haven't been able to find a solution, any help is greatly appreciated, thanks a lot!
I simply changed the line 60 in .../perl64/Config.pm from
`$^V eq 5.16.3`
to
`$^V eq 5.16.3 or $^V eq 5.16.0`
and voila! My par-packer module 1.013 installed through ppm (ActiveState Perl 5.16.3) works ...
I'll start off with my own environment:
Windows 7 x64 en_US
Strawberry Perl v5.16.2 32bit
I just confirmed that I do have PAR::Packer working on my environment. I'm running PAR::Packer version 1.014.
There is a bug logged about PAR::Packer 1.013 failing to build on certain environments. The bug is logged on CPAN here: https://rt.cpan.org/Public/Bug/Display.html?id=77408
I recommend trying one of the following paths forward (based on your build version requirements):
Install PAR::Packer 1.0.14.
Install the patched version of PAR::Packer 1.013 that is available at http://strawberryperl.com/package/kmx/perl-modules-patched/PAR-Packer-1.013_patched.tar.gz
To build you will need any dependencies as well. Hopefully those work just fine through CPAN.
Download either the patched version listed above or the latest version from the CPAN site, then execute:
perl Makefile.pl
dmake
dmake test
dmake install
Keep in mind PAR::Packer requires a C/C++ compiler to build.
I ran into this exact same error scenario with Perl 5.16.3 on my Windows 7 64 bit machine. I started my Perl tinkering with ActiveState and later installed other related programs like Komodo Edit and finally installed StrawberryPerl. After reading quite a few of these online posts I tried the manual dmake methods and whatever other suggestions I could find. I then tried uninstalling ActiveState. That didn't help either. Finally, I went on an uninstall binge and found that after uninstalling all of the ActiveState and Komodo applications (along with a bunch of other stuff I wasn't using anymore) I was able to successfully install and use pp in two simple steps from the cpan prompt:
install CPAN
install pp
I was going to uninstall and re-install StrawberryPerl next but didn't have to. The install CPAN may not be necessary but it was suggested in the log output in one of my previously failed attempts so I figured I'd try that first. Hope this saves someone all the hassle I went to as a begginer.

Perl DBD::Oracle Module installation

Could someone guide me how to install the Perl DBD::Oracle module?
Here is what I have done so far:
Platform: RHEL 5.8 64 bit
Installed Perl DBI package
Installed Oracle Instant client for Linux 64 bit (basi + sdk + sqlplus component for the instant client
Have set the correct $ORACLE_HOME and $LD_LIBRARY_PATH
Then when I do perl Makefile.pl it fails with the following error:
I'm having trouble finding your Oracle version number... trying harder
WARNING: I could not determine Oracle client version so I'll just
default to version 8.0.0.0. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.
Oracle version 8.0.0.0 (8.0)
DBD::Oracle no longer supports Oracle client versions before 9.2
Try a version before 1.25 for 9 and 1.18 for 8! at Makefile.PL line 271.
The instant client version: 11.1.0
The DBD::Oracle version is 1.44
If you have installed successfully with the Oracle instant client, then could you please let me know what am I missing?
Is it possible to install DBD::Oracle without using the Oracle instant client?
Install if missing ExtUtils-MakeMaker module (sudo yum install perl-ExtUtils-MakeMaker)
Install Perl DBI module ($ yum install perl-DBI)
Manually install below three RPMs for Oracle instant client (from Instant Client Downloads for Linux x86-64. The example is for v11.2.0.3.0-1: adapt the commands below to the actual version.)
oracle-instantclient11.2-basic-11.2.0.3.0-1
oracle-instantclient11.2-devel-11.2.0.3.0-1
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1
I am using 64 bit Linux box, so select your RPM filenames accordingly. Something like sudo yum -y install oracle-instantclient*rpm should do)
set below variables:
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
MacOS users will need:
DYLD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/
Also add ORACLE_HOME to your PATH variable.
download DBD::Oracle from CPAN
untar the module and run below commands in given sequence:
perl Makefile.PL
make
sudo make install
In case you get complaints about missing gcc you can (temporarily) install it and then remove it.
DONE !!!
Issues I had faced were due to the wrong LD_LIBRARY_PATH. I had set it to /usr/lib/oracle/11.2/client64 whereas the correct value is /usr/lib/oracle/11.2/client64/lib.
Certainly, this was a great learning for a newbie like me.
you can also read my article How to install DBD::Oracle which contains all the steps required to install DBD::Oracle CPAN module, which is not a straightforward installation. The purpose is to reduce headache and turn it into a repeatable process.
Here's what I did on CentOS 7.2 using yum packages and CPAN. This assumes you're using Oracle version 12.1 but I would imagine most versions will work this way.
Install Oracle Instant Client
yum install oracle-instantclient12.1-basic-12.1.0.2.0-1 oracle-instantclient12.1-devel-12.1.0.2.0-1 oracle-instantclient12.1-sqlplus-12.1.0.2.0-1
Copy demo make files
The install expects the *.mk file to be in /usr/share/oracle/12.1/client64 but the yum package install puts them in /usr/share/oracle/12.1/client64/demo.
sudo cp /usr/share/oracle/12.1/client64/demo/* /usr/share/oracle/12.1/client64
Modify .bashrc
Add the following lines to your ~/.bashrc
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
export PATH=$ORACLE_HOME:$PATH
Now source the file
source ~/.bashrc
Update CPAN and DBI
Update CPAN and DBI to the latest
cpan> install CPAN
cpan> reload cpan
cpan> install DBI
Install DBD::Oracle
cpan> install DBD::Oracle
A little addition to slayedbylucifer answer. I had the same problem like mentioned in the question. I've done all the steps described by slayedbylucifer. But still I got the problem like mentioned here:
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /opt/oracle/app/oracle/product/11.2.0/client_1/lib//libclntsh.so when searching for -lclntsh
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lclntsh
So I created the following symbolic link:
ln -s /opt/oracle/app/oracle/product/<YOUR_ORACLE_VERSION>/client_1/lib/libclntsh.so $ORACLE_HOME/libclntsh.so*
After that step the error from above (cannot find -lclntsh) was fixed. The execution of the make command was without any errors.
The only problem I still have is that I don't understand why this symbolic link is necessary.

Why do I get this module error: "Can't locate Error.pm in #INC"?

I tried running:
perl -e "use Error;"
from cmd in windows 7. (active perl 5.12 installed on system) and I am getting the error
Can't locate Error.pm in #INC (#INC
contains: C:/Perl64/site/lib
C:/Perl64/lib )
I manually searched and found Error.pm in C:/Perl64/lib/CPANPLUS.
Does anyone have an idea what could be going on here?
You have to install the module Error that can be found on CPAN.
But be aware of this warning:
Using the "Error" module is no longer recommended due to the black-magical
nature of its syntactic sugar, which often tends to break. Its maintainers
have stopped actively writing code that uses it, and discourage people from
doing so. See the "SEE ALSO" section below for better recommendations.
lib/CPANPLUS/Error.pm is a core "CPANPLUS::Error" module. It is used by CPANPLUS. If you want to use non-core "Error" module, you need to install it. Do "ppm install Error". Also, you can use similar modules Try::Tiny and TryCatch. They are non-core too, so you also would need to install them.
I'm on CentOS 7.3, and I have git-1.8.3.1-23 and perl-Error-0.17014-1 rpm packages installed and still got this error. I didn't want to mess with installing perl modules via CPAN. I figured out the path where perl-Error is installed (rpm -ql perl-Error) and am now running git commands like so:
PERL5LIB="/usr/lib/perl5/vendor_perl/5.8.8" git add -p someFile.sh
This works fine for me. Note that the path may be different for you.
On Centos 8, you can installing perl-Error to get this module:
sudo dnf install perl-Error
you could set PERL5LIB to prepend a directory to #INC
PERL5LIB="C:/Perl64/lib/CPANPLUS"
I forget how to set env variables permanently in windows (or if this is even the right syntax for the shell.)
also to see your #INC perl -V

Make git-svn work on Slackware 12.1

It is obviosly some Perl extensions. Perl version is 5.8.8.
I found Error.pm, but now I'm looking for Core.pm.
While we're at it: how do you guys search for those modules. I tried Google, but that didn't help much. Thanks.
And finally, after I built everything, running:
./Build install
gives me:
Running make install-lib
/bin/ginstall -c -d /usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi/Alien/SVN --prefix=/usr
/bin/ginstall: unrecognized option `--prefix=/usr'
Try `/bin/ginstall --help' for more information.
make: *** [install-fsmod-lib] Error 1
installing libs failed at inc/My/SVN/Builder.pm line 165.
Looks like Slackware's 'ginstall' really does not have that option. I think I'm going to Google a little bit now, to see how to get around this.
Base class package "Module::Build" is empty.
(Perhaps you need to 'use' the module which defines that package first.)
at inc/My/SVN/Builder.pm line 5
BEGIN failed--compilation aborted at inc/My/SVN/Builder.pm line 5.
Compilation failed in require at Build.PL line 6.
BEGIN failed--compilation aborted at Build.PL line 6.
is a (rather poor) way of asking you to install Module::Build.
Once you do that, it's
perl Build.PL
./Build
./Build test
./Build install
how do you guys search for those modules
http://search.cpan.org/
now I'm looking for Core.pm
That’s SVN::Core, which is a bit of a problem. Try installing Alien::SVN from CPAN. That worked for me on my freshly installed Slackware 12.0 on my laptop, but I have yet to get it to install on my workstation.
It should be compatible. The CPAN Tester's matrix shows no failures for Perl 5.8.8 on any platform.
Per the README, you can install it by doing:
perl Makefile.pl
make
make test
make install
I'm guessing you're running on Slackware so the cpan command is what you want to be using to install any Perl modules. It will pull in all dependencies for you. If you're running it for the first time it will have to do some cofiguration, but newer versions of cpan will ask if you want it to automatically configure it.
$ sudo cpan
cpan> install Alien::SVN
Additionally, if there's a package management application for Slackware, you should try that first to install new Perl modules.
https://metacpan.org/ is your first port of call for Perl modules.
What do you mean by "does not seem to be compatible"? Can you post the error message?
If the latest version does not work, you can select an older version in the "other releases" drop down and download that.
Edit: to those reading this, the author updated the question, so my answer seems a bit out of left field :)
The place to search is http://search.cpan.org.
I have my browser (Firefox) set up so that I can type "cpan foo" in the address bar and it will search CPAN for modules matching "foo." You can do this with either a keyword bookmark or by assigning a keyword to a search plugin.