IO::Pty perl module cpan solaris installation - perl

OS is SunOS 5.10 Generic_150400-01 sun4v sparc sun4v. Tried to install IO::Pty perl module via cpan. Got an error related to compiler Tried to Set the PATH env variable to /opt/solarisstudio12.3/bin and modified cpan myconfig.pm to have 'make_arg' => q[CC=/opt/solarisstudio12.3/bin/cc] . But still getting the same error.
cpan> install IO::Pty
CPAN: Storable loaded ok
Going to read /home/D99134/cpan/Metadata
Database was generated on Sat, 09 Nov 2013 06:53:04 GMT
Running install for module IO::Pty
Running make for T/TO/TODDR/IO-Tty-1.10.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /home/D99134/cpan/sources/authors/id/T/TO/TODDR/IO-Tty-1.10.tar.gz ok
Scanning cache /home/D99134/cpan/build for sizes
x IO-Tty-1.10, 0 bytes, 0 tape blocks
x IO-Tty-1.10/ChangeLog, 8192 bytes, 16 tape blocks
x IO-Tty-1.10/MANIFEST, 151 bytes, 1 tape blocks
x IO-Tty-1.10/META.yml, 612 bytes, 2 tape blocks
x IO-Tty-1.10/Makefile.PL, 13360 bytes, 27 tape blocks
x IO-Tty-1.10/Pty.pm, 8709 bytes, 18 tape blocks
x IO-Tty-1.10/README, 1686 bytes, 4 tape blocks
x IO-Tty-1.10/Tty.pm, 7526 bytes, 15 tape blocks
x IO-Tty-1.10/Tty.xs, 22244 bytes, 44 tape blocks
x IO-Tty-1.10/t, 0 bytes, 0 tape blocks
x IO-Tty-1.10/t/test.t, 7306 bytes, 15 tape blocks
x IO-Tty-1.10/try, 2880 bytes, 6 tape blocks
Removing previously used /home/D99134/cpan/build/IO-Tty-1.10
CPAN.pm: Going to build T/TO/TODDR/IO-Tty-1.10.tar.gz
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
ERROR: cannot run the configured compiler '/opt/SUNWspro/bin/cc'
(see conf/compilerok.log). Suggestions:
1) The complier '/opt/SUNWspro/bin/cc' is not in your PATH. Add it
to the PATH and try again. OR
2) The compiler isn't installed on your system. Install it. OR
3) You only have a different compiler installed (e.g. 'gcc').
Either fix the compiler config in the perl Config.pm
or install a perl that was built with the right compiler
(you could build perl yourself with the available compiler).
Note: this is a system-administration issue, please ask your local
admin for help. Thank you.
make: Fatal error: No arguments to build
/usr/ccs/bin/make CC=/opt/solarisstudio12.3/bin/cc -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

You have to follow the third suggestion (fixing perl's Config.pm). This is dangerous, but there's a CPAN module which allows you to do Config.pm changes on the fly: ExtUtils::FakeConfig. Just follow the instructions in the documentation.
Here's another article about editing Config.pm on perlmonks: http://www.perlmonks.org/?node_id=570684

Related

What is the 'perl-dynamic' executable

Investigating an issue with multiple Perl installations on our (HP UX IA64 system), I came across an executable called perl-dynamic. What is this and what exactly does it do?
More importantly, how do I know which perl executable it actually points to (we have multiple versions mixing version numbers and architectures installed).
bash-4.4$ ll /usr/bin/perl
lrwxr-xr-x 1 root sys 18 Jan 8 16:34 /usr/bin/perl -> /opt/perl/bin/perl
bash-4.4$ ll /opt/perl/bin/perl
lrwxrwxrwx 1 bin bin 14 Jan 8 16:45 /opt/perl/bin/perl -> ./perl-dynamic
Is this a magical perl binary which decides which version and architecture to use?
$ perl -V
Will show you the details.
Both perl-static and perl-dynamic are built with the same configuration (at least for what I can see on my HP-UX 11.31) and both are built with -Dusedl
perl-static is linked with libperl.a (or linked with all .o files), whereas perl-dynamic is linked using libperl.so. You can check the differences with ldd perl-static and ldd perl-dynamic.
There is no functional difference

Qwizard installation fails with `attempt to copy freed scalar`

While attempting to install Qwizard via cpan I get errors resembling https://rt.cpan.org/Public/Bug/Display.html?id=121401
cpan[1]> install QWizard
Reading '/Users/haroldbennett/.cpan/Metadata'
Database was generated on Mon, 27 Aug 2018 02:17:02 GMT
Running install for module 'QWizard'
Checksum for
/Users/<username>/.cpan/sources/authors/id/H/HA/HARDAKER/QWizard-3.15.tar.gz ok
Scanning cache /Users/<username>/.cpan/build for sizes ....... DONE
Configuring H/HA/HARDAKER/QWizard-3.15.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
ERROR from evaluation of
/Users/<username>/.cpan/build/QWizard-3.15-1/Generator_base/Makefile.PL:
panic: attempt to copy freed scalar 7fabf00040b0 to 7fabf02a7e58 at
/opt/local/lib/perl5/5.26/Carp.pm line 229.
Warning: No success on command[/opt/local/bin/perl5.26 Makefile.PL]
HARDAKER/QWizard-3.15.tar.gz
/opt/local/bin/perl5.26 Makefile.PL -- NOT OK
Failed during this command:
HARDAKER/QWizard-3.15.tar.gz : writemakefile NO
'/opt/local/bin/perl5.26 Makefile.PL' returned status 512
I have attempted to use the force option (something I am not a fan of), however the module casts the appearance of still not being installed when I attempt to use it in code. 'Can't locate QWizard.pm in #INC', leading me to believe that the force option was a wasted effort.
My question is, in short, how can I get this module to install?
Mac OS X version 10.13.6 (17G65)
Perl version 5.26.2 built for darwin-thread-multi-2level
QWizard-3.15

Failed AUTH: Must issue a STARTTLS command first

I cannot for the life of me figure out how to setup Bugzilla to send email using TLS. I got the Bugzilla site running, however, when I try to change my Bugzilla account email, the system fails with the following (I setup my email parameters to use my Amazon AWS email server):
An unexpected error occurred. This could be a temporary problem, or some code is behaving incorrectly. If this problem persists, please email this page to ...#.....com with details of what you were doing at the time this message appeared.
URL: http://example.com/userprefs.cgi?new_password1=&new_password2=&tab=account&old_login=jdoe%40example.com&realname=John%20Doe&new_login_name=johndoe422%40example.net&dosave=1&token=...&old_password=...
There was an error sending mail from 'bugzilla#example.com' to 'johndoe422#example.com': failed AUTH: Must issue a STARTTLS command first
Traceback:
at Bugzilla/Mailer.pm line 186.
Bugzilla::Mailer::MessageToMTA(...) called at Bugzilla/Token.pm line 116
Bugzilla::Token::IssueEmailChangeToken(...) called at /srv/www/bugzilla/userprefs.cgi line 120
main::SaveAccount(...) called at /srv/www/bugzilla/userprefs.cgi line 608
So I proceeded to try to fix this problem by following the instructions in: Bugzilla Alerts Using Gmail
I managed to install the Email::Send::SMTP::TLS module using cpanm (Not sure why I just cannot install any module via CPAN at all), after installation, the SMTP::TLS option does not appear in the drop-down. I just ignored it and continue to update Mailer.pm as instructed.
After that, when I refresh my bugzilla page, I get the following error:
Software error:
Global symbol "#args" requires explicit package name at Bugzilla/Mailer.pm line 138.
Global symbol "#args" requires explicit package name at Bugzilla/Mailer.pm line 144.
Compilation failed in require at Bugzilla/Auth.pm line 22.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22.
Compilation failed in require at Bugzilla.pm line 23.
BEGIN failed--compilation aborted at Bugzilla.pm line 23.
Compilation failed in require at /srv/www/bugzilla/editparams.cgi line 15.
BEGIN failed--compilation aborted at /srv/www/bugzilla/editparams.cgi line 15.
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
I've read that perhaps it is because Email::Send::SMTP::TLS requires Net::SSLeay package. So I proceed to try to install it using cpanm. However, cpanm fails with the following log:
23 *** Found OpenSSL-1.0.1f installed in /usr
24 *** Be sure to use the same compiler and options to compile your OpenSSL, perl,
25 and Net::SSLeay. Mixing and matching compilers is not supported.
26 Do you want to run external tests?
27 These tests *will* *fail* if you do not have network connectivity. [n] n
28 Checking if your kit is complete...
29 Looks good
30 Generating a Unix-style Makefile
31 Writing Makefile for Net::SSLeay
32 Writing MYMETA.yml and MYMETA.json
33 -> OK
34 Checking dependencies from MYMETA.json ...
35 Checking if you have Test::More 0.60_01 ... Yes (1.001014)
36 Checking if you have MIME::Base64 0 ... Yes (3.13)
37 Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.10)
38 Building and testing Net-SSLeay-1.72
39 cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
40 AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
41 blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters:
42 directory blib/lib/auto/Net/SSLeay:
43 do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
44 do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
45 get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate to get_http
46 head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al truncate to head_htt
47 post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al truncate to post_htt
48 put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate to put_http
49 ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
50 ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
51 tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
52 tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
53 cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
54 cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
55 Running Mkbootstrap for Net::SSLeay ()
56 chmod 644 "SSLeay.bs"
57 "/usr/bin/perl" "-Iinc" "/usr/share/perl/5.18/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.18/ExtUtils/typemap" -typemap "typemap" SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSL eay.c
58 cc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.72\" -DXS_VERSION=\"1.72\" -fPIC "-I/usr/lib/perl/5.18/CORE" SSLeay.c
59 {standard input}: Assembler messages:
60 {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
61 cc: internal compiler error: Killed (program cc1)
62 Please submit a full bug report,
63 with preprocessed source if appropriate.
64 See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
65 make: *** [SSLeay.o] Error 4
66 -> FAIL Installing Net::SSLeay failed. See /home/ubuntu/.cpanm/work/1443609644.32449/build.log for details. Retry with --force to force install it.
I do not know perl and cannot figure out why I'm getting errors left and right.
I read in many places that I can simply install all available packages using command like:
/usr/bin/perl install-module.pl --all
However, this command does not work for me. (I can't install any modules using CPAN at all, not sure why) It pretty much just does nothing for me. This is the output I get when execute install-module.pl:
ubuntu#ip-10-130-10-107:/srv/www/bugzilla$ sudo /usr/bin/perl install-module.pl --all
Checking for CPAN (v1.81) ok: found v2.10
Checking for YAML (any) ok: found v1.15
Checking for ExtUtils-MakeMaker (v6.31) ok: found v7.1
defined(#array) is deprecated at /usr/share/perl5/Chart/Base.pm line 181.
(Maybe you should just omit the defined()?)
defined(#array) is deprecated at /usr/share/perl5/Chart/Base.pm line 233.
(Maybe you should just omit the defined()?)
Reading '/home/ubuntu/.cpan/Metadata'
Fetching with LWP:
http://cpan.mirror.vexxhost.com/authors/01mailrc.txt.gz
Reading '/home/ubuntu/.cpan/source/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://cpan.mirror.vexxhost.com/modules/02packages.details.txt.gz
Reading '/home/ubuntu/.cpan/source/modules/02packages.details.txt.gz'
Database was generated on Wed, 30 Sep 2015 09:53:42 GMT
..........ubuntu#ip-10-130-10-107:/srv/www/bugzilla$
I'm not sure why things just don't work for me. Do I have a faulty perl installation or what? Can some perl guru please help?
Thanks!
Solved the issue by killing my Bugzilla installation (5.0.1) and completely re-install an older version (4.4.10). Things just worked with the previous version.
I fought with the same problem, with Bugzilla 5, for half a day. I did not have any success getting STARTTLS to work, which is odd, because it's the standard way to send email these days. I finally gave up and activated SMTPS (port 465) on my Postfix server. It was very easy to do this, and once I did it, Bugzilla could send emails easily. If you have control over the mail server, this is an easier approach because life is too short to spend it reading through perl code. Edit: all these years later, STARTTLS still doesn't work on Bugzilla. I tried installing libnet-smtp-tls-butmaintained-perl which some suggested, but that didn't help. For those finding this post, give up and use smtps.

CPAN Perl modules installer not finding tar file

It seems I have a configuration problem when installing Perl modules through CPAN and I don't know how to correct it:
[root#ip JESSE]# pwd
/root/.cpan/sources/authors/id/J/JE/JESSE
[root#ip JESSE]# ls -l
total 240
-rw-r--r-- 1 root root 105464 Feb 20 11:39 CHECKSUMS
-rw-r--r-- 1 root root 9223 Apr 12 2011 Locale-Maketext-Simple-0.21.tar.gz
-rw-r--r-- 1 root root 125483 Feb 20 11:39 WWW-Mechanize-1.72.tar.gz
[root#ip JESSE]# cpan -i WWW::Mechanize
CPAN: Storable loaded ok (v2.20)
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 20 Feb 2012 11:10:26 GMT
Running install for module 'WWW::Mechanize'
Running make for J/JE/JESSE/WWW-Mechanize-1.72.tar.gz
CPAN: Digest::SHA loaded ok (v5.61)
CPAN: Compress::Zlib loaded ok (v2.033)
Checksum for /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.82)
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully
Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar":
Couldn't untar WWW-Mechanize-1.72.tar
CPAN: File::Temp loaded ok (v0.22)
CPAN: CPAN::Meta loaded ok (v2.112150)
Package seems to come without Makefile.PL.
(The test -f "/root/.cpan/build/JESSE-n72IRU/Makefile.PL" returned false.)
Writing one on our own (setting NAME to WWWMechanize)
Had problems unarchiving. Please build manually
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
[root#ip JESSE]# ls -l
total 240
-rw-r--r-- 1 root root 105464 Feb 20 11:39 CHECKSUMS
-rw-r--r-- 1 root root 9223 Apr 12 2011 Locale-Maketext-Simple-0.21.tar.gz
-rw-r--r-- 1 root root 125483 Feb 20 11:39 WWW-Mechanize-1.72.tar.gz
[root#ip JESSE]# which tar
/bin/tar
[root#ip JESSE]# which gzip
/bin/gzip
The problem seems to be here:
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully
Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar":
Couldn't untar WWW-Mechanize-1.72.tar
The tar.gz file is indeed uncompressed and can be found here in a new directory:
/root/.cpan/build/JESSE-KjCEMS/WWW-Mechanize-1.72.tar
If I run the same command from inside the shell, I get some more info:
cpan[1]> install WWW::Mechanize
CPAN: Storable loaded ok (v2.20)
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 20 Feb 2012 11:10:26 GMT
Running install for module 'WWW::Mechanize'
Running make for J/JE/JESSE/WWW-Mechanize-1.72.tar.gz
CPAN: Digest::SHA loaded ok (v5.61)
CPAN: Compress::Zlib loaded ok (v2.033)
Checksum for /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Use of uninitialized value $newdir in substitution (s///) at /usr/lib64/perl5/Cwd.pm line 502.
Use of uninitialized value $newdir in chdir at /usr/lib64/perl5/Cwd.pm line 510.
Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/lib64/perl5/Cwd.pm line 510.
Use of uninitialized value $newdir in pattern match (m//) at /usr/lib64/perl5/Cwd.pm line 525.
Use of uninitialized value $newdir in split at /usr/lib64/perl5/Cwd.pm line 531.
..........................................................................--DONE
DEL(1/10): /root/.cpan/build/CPAN-1.9600-jGTV10
DEL(2/10): /root/.cpan/build/File-Which-1.09-yoVWZC
DEL(3/10): /root/.cpan/build/Test-Script-1.07-aJWrXb
DEL(4/10): /root/.cpan/build/Probe-Perl-0.01-gzZ2eR
DEL(5/10): /root/.cpan/build/IPC-Run3-0.044-AP6EMp
DEL(6/10): /root/.cpan/build/Time-HiRes-1.9721-xxseE6
DEL(7/10): /root/.cpan/build/CPAN-Meta-YAML-0.003-wGtH0a
DEL(8/10): /root/.cpan/build/JSON-PP-2.27105-fvkwNa
DEL(9/10): /root/.cpan/build/Package-Constants-0.02-7Ms_OL
DEL(10/10): /root/.cpan/build/Module-Metadata-1.000004-tXKIBB
CPAN: Archive::Tar loaded ok (v1.82)
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully
Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar":
Couldn't untar WWW-Mechanize-1.72.tar
CPAN: File::Temp loaded ok (v0.22)
CPAN: CPAN::Meta loaded ok (v2.112150)
Package seems to come without Makefile.PL.
(The test -f "/root/.cpan/build/JESSE-DGrTh_/Makefile.PL" returned false.)
Writing one on our own (setting NAME to WWWMechanize)
Had problems unarchiving. Please build manually
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Failed during this command:
JESSE/WWW-Mechanize-1.72.tar.gz : unwrapped NO -- untar failed
It seems to me that $newdir is not being updated with the dynamically generated /root/.cpan/build/JESSE-DGrTh_/ or /root/.cpan/build/JESSE-KjCEMS/ or whatever the system generates or at least that information is not getting to the tar command
Does anyone know how I can fix the mechanism without having to resort to a manual install ?
Edit:
I ran into this problem again. All I needed to do was free some memory like Keith Broughton suggested.
I ran into the same problem and tried to find the root cause for this problem. I'm listing my findings here so other Googlers don't have to spend a couple of hours before giving up...
What solved it for me was simply rebooting the system.
Things I tried:
Upgrading CPAN. This would also fail with the "Couldn't untar" error message. I doesn't matter if you try it using the cpan shell, "cpan -i CPAN" or "perl -MCPAN -e 'install CPAN'". I didn't think any of these would solve the problem, but when you start googling all these are suggested as possible solutions.
Replacing tar with a script that logs its input to check if one of the parameters or cwd is incorrect when it is called. The script is never called it seems. The "Couldn't untar" message is still the same, even after temporarily renaming /bin/tar.
Checking CPAN/Tarzip.pm and adding print lines near the code that writes the "Couldn't untar" message. It seems that the system() call fails and tar (or ls in my debug code) is never called.
Then I decided to reboot, which was an option because this is not a live system. After that the problem was gone and Perl modules installed on first try.
Other observations:
The system seems to work just fine for the rest. You can still connect to the system, you can edit files, modifications are still there after the reboot. I would expect any of these to fail long before a Perl system() call starts to fail.
A quick scan through the logfiles doesn't show any red flags.
Sometimes this can happen simply due to a lack of available memory. Try turning off some services that are running and try again.
Worked for me :-)
To resolve the following error:
Couldn't untar WWW-Mechanize-1.72.tar
Try install Archive::Tar
On centos 6.X:
yum install perl-Archive-Tar.x86_64
Found the same issue on DigitalOcean droplet with 512MB RAM running Ubuntu (with about 200MB free).
I was able to solve it by rebooting the machine, I tried updating my CPAN using 'install Bundle::CPAN'. It worked for the first few modules, and then the 'Couldn't untar' message appeared again.
Rebooting allowed me to progress in the installation. These repeated reboots are of course a less than optimal solution.
Given that the system has free memory, and the issue re-appears after using the machine for a little while, it seems to be this could be related to an issue with shared libraries.
Shot in the blue: partition is full. Delete some files.

cpan install module DBD::mysql fails, snow leopard

I am installing dependancies for Koha. This is requiring perl and cpan usage, of which this is my first time. I installed mysql via the hivelogic instructions. I am running 10.6.2 on a 32bit mac mini.
Here is the terminal output:
John-Breedloves-Mac-mini:~ john_breedlove$ sudo -H cpan -i DBD::mysql
CPAN: Storable loaded ok (v2.19)
Going to read /var/root/.cpan/Metadata
Database was generated on Tue, 19 Jan 2010 14:52:55 GMT
Running install for module 'DBD::mysql'
CPAN: YAML loaded ok (v0.71)
Running make for C/CA/CAPTTOFU/DBD-mysql-4.013.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Time::HiRes loaded ok (v1.9715)
LWP not available
Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
http://www.perl.org/CPAN/authors/id/C/CA/CAPTTOFU/CHECKSUMS
Checksum for /var/root/.cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.013.tar.gz ok
x DBD-mysql-4.013/
x DBD-mysql-4.013/lib/
x DBD-mysql-4.013/lib/DBD/
x DBD-mysql-4.013/lib/DBD/mysql.pm
x DBD-mysql-4.013/lib/DBD/mysql/
x DBD-mysql-4.013/lib/DBD/mysql/GetInfo.pm
x DBD-mysql-4.013/lib/DBD/mysql/INSTALL.pod
x DBD-mysql-4.013/lib/Bundle/
x DBD-mysql-4.013/lib/Bundle/DBD/
x DBD-mysql-4.013/lib/Bundle/DBD/mysql.pm
x DBD-mysql-4.013/mysql.xs
x DBD-mysql-4.013/dbdimp.c
x DBD-mysql-4.013/myld
x DBD-mysql-4.013/INSTALL.html
x DBD-mysql-4.013/Makefile.PL.embedded
x DBD-mysql-4.013/TODO
x DBD-mysql-4.013/README
x DBD-mysql-4.013/MANIFEST.SKIP
x DBD-mysql-4.013/ChangeLog
x DBD-mysql-4.013/Makefile.PL
x DBD-mysql-4.013/META.yml
x DBD-mysql-4.013/dbdimp.h
x DBD-mysql-4.013/eg/
x DBD-mysql-4.013/eg/prepare_memory_usage.pl
x DBD-mysql-4.013/eg/proc_example2b.pl
x DBD-mysql-4.013/eg/proc_example2.pl
x DBD-mysql-4.013/eg/decimal_test.pl
x DBD-mysql-4.013/eg/bug30033pg.pl
x DBD-mysql-4.013/eg/proc_example2a.pl
x DBD-mysql-4.013/eg/proc_example4.pl
x DBD-mysql-4.013/eg/bug21028.pl
x DBD-mysql-4.013/eg/bug14979.pl
x DBD-mysql-4.013/eg/bug30033.pl
x DBD-mysql-4.013/eg/issue21946.pl
x DBD-mysql-4.013/eg/proc_example3.pl
x DBD-mysql-4.013/eg/proc_example1.pl
x DBD-mysql-4.013/constants.h
x DBD-mysql-4.013/t/
x DBD-mysql-4.013/t/85init_command.t
x DBD-mysql-4.013/t/40listfields.t
x DBD-mysql-4.013/t/40bindparam.t
x DBD-mysql-4.013/t/mysql.mtest
x DBD-mysql-4.013/t/41bindparam.t
x DBD-mysql-4.013/t/76multi_statement.t
x DBD-mysql-4.013/t/40nulls.t
x DBD-mysql-4.013/t/32insert_error.t
x DBD-mysql-4.013/t/40catalog.t
x DBD-mysql-4.013/t/51bind_type_guessing.t
x DBD-mysql-4.013/t/40bindparam2.t
x DBD-mysql-4.013/t/41blobs_prepare.t
x DBD-mysql-4.013/t/20createdrop.t
x DBD-mysql-4.013/t/70takeimp.t
x DBD-mysql-4.013/t/42bindparam.t
x DBD-mysql-4.013/t/00base.t
x DBD-mysql-4.013/t/55utf8.t
x DBD-mysql-4.013/t/65types.t
x DBD-mysql-4.013/t/40server_prepare_error.t
x DBD-mysql-4.013/t/31insertid.t
x DBD-mysql-4.013/t/29warnings.t
x DBD-mysql-4.013/t/40types.t
x DBD-mysql-4.013/t/10connect.t
x DBD-mysql-4.013/t/lib.pl
x DBD-mysql-4.013/t/mysql.dbtest
x DBD-mysql-4.013/t/35limit.t
x DBD-mysql-4.013/t/71impdata.t
x DBD-mysql-4.013/t/40blobs.t
x DBD-mysql-4.013/t/40server_prepare.t
x DBD-mysql-4.013/t/40numrows.t
x DBD-mysql-4.013/t/35prepare.t
x DBD-mysql-4.013/t/40keyinfo.t
x DBD-mysql-4.013/t/75supported_sql.t
x DBD-mysql-4.013/t/60leaks.t
x DBD-mysql-4.013/t/50commit.t
x DBD-mysql-4.013/t/30insertfetch.t
x DBD-mysql-4.013/t/50chopblanks.t
x DBD-mysql-4.013/t/25lockunlock.t
x DBD-mysql-4.013/t/80procs.t
x DBD-mysql-4.013/MANIFEST
CPAN: File::Temp loaded ok (v0.20)
CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.013.tar.gz
Can't locate DBI/DBD.pm in #INC (#INC contains: /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 .) at Makefile.PL line 24.
Warning: No success on command[/opt/local/bin/perl Makefile.PL]
CAPTTOFU/DBD-mysql-4.013.tar.gz
/opt/local/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
The clue was in this line of your quoted output:
Can't locate DBI/DBD.pm in #INC...
You'll be seeing this type of error a lot as you develop in Perl! It means that you are missing a module dependency, generally because the module hasn't been installed from CPAN.
Therefore, you need to install DBI::DBD first before DBD::mysql. There are some complicated reasons why this isn't installed automatically by cpan as a prerequisite (usually when installing a module or distribution, it will automatically install all its dependencies):
PREREQ_PM tells MakeMaker that DBI (version 1.03 in this case) is required for this module. This will issue a warning that DBI 1.03 is missing if someone attempts to install your DBD without DBI 1.03. See CONFIGURE below for why this does not work reliably in stopping cpan testers failing your module if DBI is not installed.
CONFIGURE is a subroutine called by MakeMaker during WriteMakefile. By putting the require DBI::DBD in this section we can attempt to load DBI::DBD but if it is missing we exit with success. As we exit successfully without creating a Makefile when DBI::DBD is missing cpan testers will not report a failure. This may seem at odds with PREREQ_PM but PREREQ_PM does not cause WriteMakefile to fail (unless you also specify PREREQ_FATAL which is strongly discouraged by MakeMaker) so WriteMakefile would continue to call dbd_dbi_arch_dir and fail.
You can install both modules at once with:
sudo -H cpan DBI::DBD DBD::mysql
I spent a most of an evening googleing and trying the various directions to get DBD::mysql to work with my existing osx perl installation. I was making no progress and finally tried installing active perl. It comes with a perl package manager (ppm). From there, you can install a pure perl mysql driver (DBD::mysqlPP) and this bypasses all the compilation headaches. - Just be sure to change your code to use DBD::mysqlPP rather than DBD::mysql - in my case, I changed
this:
my $dsn = 'DBI:mysql:schemaName:localhost';
to this:
my $dsn = 'DBI:mysqlPP:schemaName:localhost';
Try installing DBI.pm first.