0

我发现这个非常好的用户定义函数用于在 mysql 中使用正则表达式 但是当尝试安装时我找不到 mysql 库

checking for mysqlbin... dirname: missing operand
Try `dirname --help' for more information.
checking for mysql_config... no
no
configure: error: "Can't find mysql library"

该网站说If mysql is an unusual place, you might need to add --with-mysql=<mysql directory>/bin/mysql_config

我找不到 mysql_config

/var/log/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/share/mysql
/usr/lib/mysql
/etc/mysql/

我正在使用 ubuntu lucid lynx,任何建议将不胜感激
编辑安装工作感谢apt-get install libmariadbclient16-dev但是现在preg_replace('/i/','a','ia')返回6161而不是ii

4

3 回答 3

2

您需要安装 libmysqlclient-dev(或 libmariadbclient16-dev,如果您愿意)来获取 mysql_config。

于 2011-07-12T12:20:31.087 回答
0

对于centos:

sudo yum install MariaDB-devel

在您需要选择 mariadb 存储库之前:https ://downloads.mariadb.org/mariadb/repositories/#mirror=timeweb&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.0

ps:“3.Choose a Version”是maria db版本!

于 2015-07-16T08:46:44.357 回答
0

https://github.com/mysqludf/lib_mysqludf_preg/issues/5

mysql_config not found was a good clue : Had to install - 
sudo apt-get install libmysqlclient-dev
于 2015-10-01T16:32:49.570 回答