Problems installing DBD::mysql on Solaris 8
5 comments. Current rating: (3 votes). Leave comments and/ or rate it.
Question:I need to access a mysql database using perl on Solaris 8. I installed DBI already but fail to install DBD::mysql.
I get error messages that the gcc compiler does not understand certain options:
gcc: unrecognized option `-Xa'
gcc: language arch=v8 not recognized
If I just copy the DBD::mysql.pm to the target directory, I get error messages that the driver cannot be located in Mysql.pm
Answer:I was in the same situation. After unpacking DBD-mysql-3.0006.tar I ran
Then when running make, those error messages showed up.
I looked at the options for gcc and found that I should remove them. I also found that the option for the include files (search path -I) specified a folder that did not exist in my system.
The original include file path was /usr/local/mysql/include/mysql but after installing the package on Solaris (all with the default values) it should have been /usr/local/mysql/include
So instead I created the makefile using:
perl Makefile.PL --cflags="-I/usr/local/mysql/include"
Then I issued a 'make', followed by 'make install', and everything worked fine.