DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

DBD::mysql failing

Open kirandba-hub opened this issue 4 years ago • 2 comments
trafficstars

Hi,

I'm getting below error while installing the DBD::mysql on Linux server.I downloaded the tar.gz file from cpan website from the extracted folder i'm giving perl Makefile.PL

perl Makefile.PL Can't locate Devel/CheckLib.pm in @inc (@inc contains: /root/PERL_DBI_DBD/lib64/perl5 /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 Makefile.PL line 12. BEGIN failed--compilation aborted at Makefile.PL line 12.

Can you please help to resolve the issue.

Thanks, Kiran

kirandba-hub avatar Jul 28 '21 05:07 kirandba-hub

This is not the correct procedure to install a CPAN module. It's recommended to use cpan or cpanm which will follow the correct procedure. https://metacpan.org/pod/DBD::mysql::INSTALL#Manual-installation misses some steps: install configure prerequisites listed in META.json, run Makefile.PL, install build, test, and runtime prequisites listed in MYMETA.json, then the rest of the normal install process listed there.

Grinnz avatar Jul 28 '21 05:07 Grinnz

@Grinnz Thanks for reply...I have tried with cpan,but no luck.Getting below error

cpan

Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help.

cpan[1]> install DBD::mysql Reading '/root/.cpan/Metadata' Database was generated on Tue, 27 Jul 2021 03:29:02 GMT Running install for module 'DBD::mysql' Running make for D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz Checksum for /root/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok Scanning cache /root/.cpan/build for sizes ............................................................................DONE

CPAN.pm: Building D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz

Can't locate Devel/CheckLib.pm in @INC (@INC contains: /root/PERL_DBI_DBD/lib64/perl5 /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 Makefile.PL line 12. BEGIN failed--compilation aborted at Makefile.PL line 12. Warning: No success on command[/usr/bin/perl Makefile.PL] 'YAML' not installed, will not store persistent state DVEEDEN/DBD-mysql-4.050.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 Failed during this command: DVEEDEN/DBD-mysql-4.050.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 512

kirandba-hub avatar Jul 28 '21 05:07 kirandba-hub

Please install Devel::CheckLib via cpan or your OS packages (e.g. apt install libdevel-checklib-perl on Ubuntu/Debian or dnf install perl(Devel::CheckLib) on Fedora/RHEL)

dveeden avatar Aug 23 '23 15:08 dveeden