I already have a system perl (v5.10.1) installed on GNU/Linux under /usr/bin/perl and a MySQL server and client are running on same host under /usr/bin/mysql.
mysql> SELECT VERSION(); +-----------+ | VERSION() | +-----------+ | 5.1.73 | +-----------+
I have installed local perl (v5.24.0) under application owned directory ~/localperl/bin/perl and have installed CPAN, cpanm and other required modules using them. But when I am trying to install DBD::mysql using cpanm or cpan shell (after installing DBI for local perl) I get error as below:
Running make for M/MI/MICHIELB/DBD-mysql-4.041.tar.gz cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod Running Mkbootstrap for DBD::mysql () chmod 644 "mysql.bs" cc -c -I/~/localperl/lib/site_perl/5.24.0/x86_64-linux/auto/DBI -I/us +r/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstac +k-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFS +ET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC - +DUNIV_LINUX -DUNIV_LINUX -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_I +S_GOOD -g -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/us +r/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY +_SOURCE=2 -O2 -DVERSION=\"4.041\" -DXS_VERSION=\"4.041\" -fPIC "-I/ +~/localperl/lib/5.24.0/x86_64-linux/CORE" dbdimp.c In file included from dbdimp.c:20: dbdimp.h:21:49: error: mysql.h: No such file or directory dbdimp.h:22:45: error: mysqld_error.h: No such file or directory dbdimp.h:24:49: error: errmsg.h: No such file or directory In file included from dbdimp.c:20:
I found from some old posts on PM that this means I need to have the development headers and mysql client libraries available on my system. I have already checked for mysql.h, mysqld_error.h and errmsg.h files on my machine but they are not present.
Per documentation I think I can install these using yum as:
yum -y install make gcc mysql-devel mysql-libs mysql-server yum -y install "perl(Test::Deep)" "perl(Test::More)" systemctl start mysql.service
But won't this again install it for system perl instead of local perl? So few questions I have are:
1) How to get development headers and mysql client libraries for local perl?
2) Are there any reference docs I can follow for this specific need to install DBD::mysql on GNU/LINUX for local perl where system perl is also installed and MySQL server and client are on the same host.
Thank you for bearing with my long post.
In reply to How to get development headers and mysql client libraries for DBD::mysql installation by Perl300
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |