Mysql Gem Error - OpenNebula 5.4

Hi,

I try to install 5.4 version on a clean system.

  • CentOS 7
  • MariaDB 10.2.8

When trying to install gems - get an error:

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

    /usr/bin/ruby extconf.rb
checking for rb_absint_size()... no
checking for rb_absint_singlebit_p()... no
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 rb_big_cmp()... yes
-----
Using mysql_config at /bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
checking for SSL_MODE_DISABLED in mysql.h... no
checking for MYSQL_OPT_SSL_ENFORCE in mysql.h... yes
checking for MYSQL.net.vio in mysql.h... no
checking for MYSQL.net.pvio in mysql.h... yes
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
-----
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
-----
-----
Setting libpath to /usr/lib64
-----
creating Makefile

make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/include/mysql -I/usr/include/mysql/..
-DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD
-DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_RB_BIG_CMP -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H
-DHAVE_CONST_MYSQL_OPT_SSL_ENFORCE -DHAVE_MYSQL_NET_PVIO -DHAVE_ST_NET_PVIO -DHAVE_CONST_MYSQL_ENABLE_CLEARTEXT_PLUGIN
-fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -mtune=generic -fPIC  -m64 -o statement.o -c statement.c
In file included from statement.c:1:0:
./mysql2_ext.h:14:23: fatal error: mysql_com.h: No such file or directory
 #include <mysql_com.h>
                       ^
compilation terminated.
make: *** [statement.o] Error 1


Gem files will remain installed in /usr/local/share/gems/gems/mysql2-0.4.9 for inspection.
Results logged to /usr/local/share/gems/gems/mysql2-0.4.9/ext/mysql2/gem_make.out

An error occurred while installing mysql2 (0.4.9), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.9'` succeeds before bundling.
Installed Packages
Name        : MariaDB-devel
Arch        : x86_64
Version     : 10.2.8
Release     : 1.el7.centos
Size        : 40 M
Repo        : installed
From repo   : mariadb
Summary     : MariaDB: a very fast and robust SQL database server
URL         : http://mariadb.org
License     : GPLv2

Doesnt work with 10.2 ?
Terribly update production :scream:

People are already discussing this: https://github.com/brianmario/mysql2/issues/878
Maybe consider mariadb-10.1 for now.

I saw this issue ) Thank u.