0

I've setup percona-server-server and percona-server-client packages as per the instructions on the percona website, but when I try to install the mysql gem, I see the following message:

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

Looking in the logs I see:

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

I tried installing libmysqlclient-dev, but this installs the 5.5 version, and I see this error:

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

How do I install this properly?

1

Instead of libmysqlclient-dev, install libperconaserverclient18.1-dev and libssl-dev packages.

More info in this Ask Ubuntu answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.