Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a 100% workin script in perl, and i also set up a mysql server, so when i try to run dis perl scrits, it says:
Code:
[root@games hlstats]# ./hlstats.pl
++ HLstats 1.20 starting...
-- Opening UDP listen socket on port 27500 ... opened OK
-- Connecting to MySQL database 'hlstats' on 'localhost' as user 'root' ... install_driver(mysql) failed: Can't load '/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.10: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./hlstats.pl line 971
[root@games hlstats]#
This is what in da 971 line
Code:
print "-- Connecting to MySQL database '$db_name' on '$db_host' as user '$db_user' ... ";
$db_conn = DBI->connect(
"DBI:mysql:$db_name:$db_host",
$db_user, $db_pass
) or die ("\nCan't connect to MySQL database '$db_name' on '$db_host'\n" .
"Server error: $DBI::errstr\n");
print "connected OK\n";
I tryed 2 find any modules, that support myaql+perl working
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
You need to look at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229 to understand what is failing. But the error is very descriptive: It looks like one of the share libraries is not where it should be. It may have been deleted, never installed, or you might need to create a symlink to it where it's really installed.
Thet is wat is thet file (listing begins with line 229)
Code:
my $libref = dl_load_file($file, $module->dl_load_flags) or
croak("Can't load '$file' for module $module: ".dl_error());
push(@dl_librefs,$libref); # record loaded object
my @unresolved = dl_undef_symbols();
if (@unresolved) {
require Carp;
Carp::carp("Undefined symbols present after loading $file: @unresolved\
}
I dont understand what the library i miss, and where i have 2 put it?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
You're missing either this: /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so
or this: libmysqlclient.so.10
(the error message isn't totally clear on whether it couldn't find the first file, or whether it couldn't load the first library because the second was missing).
I would start by verifying that /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so exists in that path. If it doesn't, look for mysql.so and see where else it might be. You can use the find command to do this:
$ find / -name mysql.so
if it's not in the right place, try making a copy and putting it in the directory that PERL expects.
If that's all find, then look for libmysqlclient.so.10 in the same way.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
try just "*libmysqlclient.so.*", there may be a different version of the library installed. Although it's not recommended, it may be possible to symlink a different version of the library to .10.
I have solved all problems with perl modules, no i have another trouble with mysql:
Code:
[root@games hlstats]# ./hlstats.pl
++ HLstats 1.20 starting...
-- Opening UDP listen socket on port 27500 ... opened OK
-- Connecting to MySQL database 'hlstats' on 'localhost' as user 'root' ... DBI connect('hlstats:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at ./hlstats.pl line 971
Can't connect to MySQL database 'hlstats' on 'localhost'
Server error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@games hlstats]#
Why cant mysqlserver support unix sockets? What i did wrong?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.