如何在 Ubuntu 14.04 Trusty 上安装带有 percona 5.6 的 mysql2 gem?

如何在 Ubuntu 14.04 Trusty 上安装带有 percona 5.6 的 mysql2 gem?

我已经percona-server-server按照percona-server-clientPercona 网站上的说明,但是当我尝试安装 mysql gem 时,看到以下消息:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

查看日志我发现:

checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no

我尝试安装libmysqlclient-dev,但安装的是 5.5 版本,并且出现以下错误:

Incorrect MySQL client library version! This gem was compiled for 5.5.41 but the client library is 5.6.23-72.1.

我该如何正确安装它?

答案1

而不是libmysqlclient-dev,安装libperconaserverclient18.1-devlibssl-dev包裹。

更多信息请参见此处询问 Ubuntu 答案

相关内容