- 论坛徽章:
- 0
|
我用普通用户安装了DBI
perl Makefile.PL PREFIX=/home/wst40/work_mysql/lib/
make
make test
make install
没有报错,应该是装上了,而且有下边的目录等文件
/home/wst40/work_mysql/lib/lib/perl5/site_perl/5.8.8/i686-linux/DBI
在代码中
#!/usr/bin/perl -w
use strict;
use lib "/home/wst40/work_mysql/lib/lib/perl5/site_perl/5.8.8/i686-linux/"; # 这行我应该写到什么目录呢???好几个目录我都试过了。。。
use DBI;
print "welcome to the Test ! ............. \n";
my $dbh = DBI->connect("DBI:mysql:database=wangljDB;host=localhost","root","test", {'RaiseError' => 1});
可是就是报错。。。
[wst40@localhost work_mysql]$ ./opMysql.pl
Can't load '/home/wst40/work_mysql/lib/lib/perl5/site_perl/5.8.8/i686-linux//auto/DBI/DBI.so' for module DBI: /home/wst40/work_mysql/lib/lib/perl5/site_perl/5.8.8/i686-linux//auto/DBI/DBI.so: undefined symbol: PL_dowarn at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
at /home/wst40/work_mysql/lib/lib/perl5/site_perl/5.8.8/i686-linux//DBI.pm line 263
BEGIN failed--compilation aborted at /home/wst40/work_mysql/lib/lib/perl5/site_perl/5.8.8/i686-linux//DBI.pm line 263.
Compilation failed in require at ./opMysql.pl line 5.
BEGIN failed--compilation aborted at ./opMysql.pl line 5.
[wst40@localhost work_mysql]$
请问是哪的问题呢???
谢谢了
昨晚问过版主一些,在这里谢谢了!
最后我还是用root帐户装了
问题依然存在
下边是新的问题
为了访问mysql数据库更方便,我想安装DBD::mysql
但是遇到的问题是mysql我不是默认安装在/var下的,
perl Makefile.PL 报错:
[root@localhost DBD-mysql-4.006]# perl Makefile.PL
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 76.
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 466.
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 466.
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 466.
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 466.
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 466.
Can't exec "mysql_config": 没有那个文件或目录 at Makefile.PL line 466.
Failed to determine directory of mysql.h. Use
这个是不是要修改Makefile.PL 呢,看了半天没发现怎么改。。。。
多谢指点
[ 本帖最后由 King_Leo 于 2008-3-12 17:31 编辑 ] |
|