Шукати в цьому блозі

четвер, 29 жовтня 2009 р.

Установка Perl модуля DBD::mysql. Ошибка Can't exec "mysql_config".

Ubuntu linux 9.04 server ed.
Имея установленный mysql-client при установке, с помощью cpan, модуля DBD::mysql, процесс завершался ошибой:

Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 464.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 464.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I dir

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
CAPTTOFU/DBD-mysql-4.013.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read '/root/.cpan/build/DBD-mysql-4.013-2UEonO/META.yml'. Falling back to other methods to determine prerequisites
Failed during this command:
CAPTTOFU/DBD-mysql-4.013.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512


Решение - установка дополнительного пакета libmysql++-dev который содержит C++ API для запросов к Mysql (и других SQL баз):
sudo apt-get install libmysql++-dev

4 коментарі:

The sins of my father сказав...

Большое спасибо!

Dmitry Sandalov сказав...

спасибо!

Easy.Mutant сказав...

Рад, что кому-то еще пригодилось!

Unknown сказав...

Спасибо!