Re: DBD-mysql-4.005 instalation error!

Peter Pentchev <[email protected]> Mon, 10 Sep 2007 17:21:25 +0300
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
On Mon, Sep 10, 2007 at 05:18:55AM -0700, chaminda siyasingha wrote:
> Hi All,
> 
> I have already istalled DBI-mysql-1.59 but when I am instaling  DBD-mysql-4.005 on Linux it gives following error.I have using follwing command to install DBD-mysql-4.005 ,Could you help me to solve this isuue please,
> 

> >> sudo perl Makefile.PL  --testdb=test --testuser=root
> >> --testpassword=osloadmin --testhost=localhost
> >> --cflags="-I/usr/share/mysql/mysql-test/include"
> >> --libs="-L/var/lib/mysql/mysql -lmysqlclient -lz -lm"
> >> --mysql_config="/etc/mysql/my.cnf"

The --mysql_config option should NOT specify your MySQL configuration
file; rather, if you want to use it at all, you should point it at
a file named "mysql_config", which is most likely in your /usr/bin
directory.  The mysql_config file is a helper program that displays
the flags and paths for the compiler and linker, so that you don't
really need to specify --cflags, --libs, and stuff.  In short, your
configuration line should be something more like:

sudo perl Makefile.PL  --testdb=test --testuser=root
--testpassword=osloadmin --testhost=localhost
--mysql_config="/usr/bin/mysql_config"

Of course, that's assuming your mysql_config helper is really installed
in /usr/bin.


In your case, most of the error messages you're seeing are there because
DBD-mysql's Makefile.PL has tried to run your config file as a shell
script :)

> 
> ERROR
> 
> /etc/mysql/my.cnf: 20: t: not found
> /etc/mysql/my.cnf: 21: port: not found
> /etc/mysql/my.cnf: 22: socket: not found
> /etc/mysql/my.cnf: 28: [mysqld_safe]: not found
[snip]
> Argument "6.30_01" isn't numeric in numeric ge (>=) at Makefile.PL line 355.

This one, however, might be more fun than it looks like, but there's no
way to be certain whether it's a real one or it's there simply because
Makefile.PL has not managed to configure itself properly.

Can you try running Makefile.PL with the proper value for --mysql-config
and see if it helps?

G'luck,
Peter

-- 
Peter Pentchev	[email protected]    [email protected]    [email protected]
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
The rest of this sentence is written in Thailand, on
signature.asc (application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFG5VLj7Ri2jRYZRVMRAgNoAKCGkkzkh9KKjhXi94MnQVI+1a57lACfWMfh
zfQGV45RM6SRtNiRdr4aXmo=
=UdAf
-----END PGP SIGNATURE-----