Install DBD::mysql for Mysql 5 on Solaris 10 October 25, 2010
Posted by claudio in Uncategorized.Tags: DBD::mysql, Mysql, Perl, Solaris
add a comment
Installing DBD::mysql can be a little complicated because the needed libraries and header files are often not installed on Solaris or found in weird places (Howto on installing DBD::mysql with Solaris supplied mysql 4.0.31 and perl 5.8.4). This post explains how to install the module linked with Mysql 5.
To install the module do this:
- Install Mysql5. The paths on this post are applicable to the Sun Webstack installation in /opt/webstack. When using an other package or when compiling mysql yourself, change the paths accordingly. Remember that both perl and mysql must coincide in the binary format (32- or 64-bit). Because I use a self compiled 64-bit perl installation, the mysql binaries must be 64-bit as well.
- Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
- Run the makefile with the following arguments (adapt to your own needs if necessary):
$ cd ~/.cpan/build/DBD-mysql-<VERSION>
$ perl Makefile.PL --libs '-R/opt/webstack/mysql/5.0/lib/sparcv9/mysql -L/opt/webstack/mysql/5.0/lib/sparcv9/mysql -lmysqlclient -lz' --cflags '-I/opt/webstack/mysql/5.0/include/mysql -m64' --with-mysql=/opt/webstack/mysql
(After -lz you can add other options depending on your needs, like -lcrypt for ssl support.) - Complete the normal installation (make, make test (if you have a test db running), make install).
That’s it.
Install DBD::mysql for Solaris 10 system perl August 13, 2009
Posted by claudio in Uncategorized.Tags: DBD::mysql, Mysql, Perl, Solaris, Solaris 10, UNIX
5 comments
Installing DBD::mysql on Solaris 10 seems to be less trivial than “cpan DBD::mysql” when you want to use the system-supplied perl (5.8.4) and mysql (4.0.31) installation. Google shows a lot of people asking how to proceed, but surprisingly no answers. Typically, one gets this error at make time:
[...]
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4630: undefined struct/union member: pmysql
"dbdimp.c", line 4653: undefined struct/union member: pmysql
cc: acomp failed for dbdimp.c
make: *** [dbdimp.o] Error 1
To install the module do this:
- Install the following Solaris mysql packages (if not already installed): SUNWmysqlr, SUNWmysqlu, SUNWmysqlS, SUNWmysqlt.
- Type the following as root:
cd /usr/sfw/share/src/mysql
./configure - Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
- Run the makefile with the following arguments (adapt to your own needs if necessary):
cd ~/.cpan/build/DBD-mysql-<VERSION>
perl Makefile.PL --libs '-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm' --cflags '-I/usr/sfw/include -I/usr/include -I/usr/sfw/share/src/mysql/include' - Complete the normal installation (make, make test (if you have a test db running), make install).
That’s it.









