Re: DBD mysql
by Danny (Chaplain) on Sep 24, 2024 at 21:19 UTC
|
That means none of these files exist
/usr/local/lib/perl5/site_perl/5.38.2/x86_64-linux/DBD/mysql.pm
/usr/local/lib/perl5/site_perl/5.38.2/DBD/mysql.pm
/usr/local/lib/perl5/5.38.2/x86_64-linux/DBD/mysql.pm
/usr/local/lib/perl5/5.38.2/DBD/mysql.pm
Can you verify that by manually checking?
If it's not there you probably have something wrong with your @INC variable.
Update: Looking more closely at the error it seems to be missing the shared object file like:
/usr/local/lib/perl5/site_perl/5.38.2/x86_64-linux/auto/DBD/mysql/mysq
+l.so
Maybe try find /usr/local/lib/perl5 | grep mysql, to see all the mysql stuff. | [reply] [d/l] [select] |
|
|
Some errors pertaining to .so files can refer to the file itself, or to a dependency. So if DBD/mysql/mysql.so exists, it could be that it's a dependency that's missing. Maybe the underlying MySQL library was updated and it now has a different name?
Re-installing DBD::mysql should fix the issue. Either that or DBD::mysql is being installed in a "non-standard" location and Perl wasn't told to look there.
| [reply] [d/l] [select] |
|
|
| [reply] |
|
|
If I reinstall DBD::mysql am I risking breaking all my running scripts that use it?
If those scripts fail, my business would suffer a big loss of income.
Most of my billable activities are fed by these scripts.
Of the many things I don't understand, why did this just break when there were zero changes on the server?
And, why do they all work in html but just not on the command line?
| [reply] |
|
|
|
|
|
|
|
|
mysql.pm exists in these:
/usr/local/lib/perl5/site_perl/5.38.2/DBD/mysql.pm
/usr/local/lib/perl5/5.38.2/x86_64-linux/DBD/mysql.pm
/usr/local/lib/perl5/5.38.2/DBD/mysql.pm
| [reply] |
|
|
In each of those three locations check if DBD/mysql/mysql.so exists. If it exists in some but not others, in the paths where it doesn't exist move your mysql.pm to some other name like "mv mysql.pm mysql.pm.save" and see if that fixes it.
| [reply] [d/l] [select] |
|
|
|
|
Thank you Danny,
I'm lost in the threads but all of the scripts run in html and also in the shell except one. Which ran without a problem 15 times. Now, on the 16th try is when the message shows.
The server is dedicated and purposely has had zero upgrades because upgrades tend to break things.
I tried running as root and also as admin. I think html runs as wheel but I'm not sure.
All the scripts are 755 permission.
I think the html user is www-data.
www-data 31575 0.0 0.3 98448 7588 ? S 06:25 0:08 /usr/sbin/apache2 -k start
| [reply] |
|
|
root@localhost:/var/www/cgi-bin/plivo/google-ads-perl# find /usr/local/lib/perl5 | grep mysql
/usr/local/lib/perl5/site_perl/5.38.2/x86_64-linux/DBD/mysql.pm
/usr/local/lib/perl5/site_perl/5.38.2/DBD/mysql.pm
/usr/local/lib/perl5/site_perl/5.38.2/DBD/mysql.pl
/usr/local/lib/perl5/5.38.2/x86_64-linux/DBD-save/mysql.pm
/usr/local/lib/perl5/5.38.2/DBD/mysql.pm
| [reply] |
|
|
Since auto/DBD/mysql/mysql.so seems to be missing you should probably reinstall DBD::mysql. The find/grep should give you a list something like:
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBD/my
+sql
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBD/my
+sql/mysql.so
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/auto/DBD/my
+sql/.packlist
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/Bundle/DBD/
+mysql.pm
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/DBD/mysql
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/DBD/mysql/I
+NSTALL.pod
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/DBD/mysql/G
+etInfo.pm
/.../5.38.0/lib/site_perl/5.38.0/x86_64-linux-thread-multi/DBD/mysql.p
+m
| [reply] [d/l] [select] |
|
|
I must have mis-stated.
These locations are where mysql.pm does exist.
/usr/local/lib/perl5/site_perl/5.38.2/x86_64-linux/DBD/mysql.pm
/usr/local/lib/perl5/site_perl/5.38.2/DBD/mysql.pm
/usr/local/lib/perl5/5.38.2/x86_64-linux/DBD/mysql.pm
/usr/local/lib/perl5/5.38.2/DBD/mysql.pm
| [reply] |
|
|
I understood, but auto/DBD/mysql/mysql.so doesn't seem to be there according to your find/grep. Thus, you should probably try to reinstall DBD::mysql.
| [reply] [d/l] |
Re: DBD mysql
by swl (Prior) on Sep 25, 2024 at 01:28 UTC
|
Use the otool utility on mysql.so and similar files. This will show all the dependencies it is expecting, and should highlight the ones it cannot find.
I'm not in front of a mac at the moment so cannot test, but it should be something like this:
otool -l /usr/local/lib/perl5/site_perl/5.38.2/x86_64-linux/auto/DBD/mysql/mysql.so
An example with output is at this link: https://forums.developer.apple.com/forums/thread/705281.
| [reply] [d/l] |