无法在Ubuntu上安装Perl DBD模块(针对Bugzilla)

试图在Ubuntu 12.04上安装bugzilla-4.2.2 。 当我运行checksetup.pl出现以下错误:

 YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database you use): PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg MySQL: /usr/bin/perl install-module.pl DBD::mysql SQLite: /usr/bin/perl install-module.pl DBD::SQLite Oracle: /usr/bin/perl install-module.pl DBD::Oracle To attempt an automatic install of every required and optional module with one command, do: /usr/bin/perl install-module.pl --all 

我已经通过XAMPP安装了MySQL,所以我运行:

 /urs/bin/perl install-module.pl DBD::mysql 

并得到以下错误:

 perl Makefile.PL --testuser=username Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. 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 479. 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 479. 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 LIB="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib" INSTALLMAN1DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man1" INSTALLMAN3DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man3" INSTALLBIN="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLSCRIPT="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLDIRS=perl] CAPTTOFU/DBD-mysql-4.021.tar.gz /usr/bin/perl Makefile.PL LIB="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib" INSTALLMAN1DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man1" INSTALLMAN3DIR="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/man/man3" INSTALLBIN="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLSCRIPT="/opt/lampp/htdocs/bugzilla/4.2.2/bugzilla-4.2.2/lib/bin" INSTALLDIRS=perl -- NOT OK Skipping test because of notest pragma Running make install Make had some problems, won't install Could not read metadata file. Falling back to other methods to determine prerequisites 

所以然后我尝试了checksetup.pl的build议,跑了:

 /usr/bin/perl install-module.pl --all 

而且似乎已经安装了DBD::SQLite没有任何问题,但我又看到一个警告,说它由于notest pragma跳过testing。

当我重新运行checksetup.pl它显示在“未find”列表中的4个原始数据库驱动程序中的3个:

 PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg MySQL: /usr/bin/perl install-module.pl DBD::mysql Oracle: /usr/bin/perl install-module.pl DBD::Oracle 

所以运行它所有似乎已经安装SQLite驱动程序没有任何问题,但出于某种原因,我似乎无法安装MySQL驱动程序。 我再次需要MySQL,因为那是XAMPP使用的,因为我更喜欢MySQL。 我有一种感觉,这与这个notest pragma错误有关。 有任何想法吗? 提前致谢!

为什么不直接从PPA安装Bugzilla 4,为自己节省很多麻烦?

我知道这听起来可能很愚蠢,但是我自己也是这么做的,这里可能值得一提。

如果你得到一个错误,说make(或其他显然应该可用的东西)不是在repos中不可用的,而你正在进行全新的安装,请确保你已经运行了sudo apt-get update 。 我做了一个小时前的全新安装,并安装bugzilla,并没有重新启动或运行apt-get update和吓坏了,当我没有看到提供..运行apt-get update ,然后运行sudo apt-get install make并没有安装任何问题。

希望这可以帮助像我这样偏执/健忘的人。