gem install mysql2 -v '0.3.18'

2 posts / 0 new
Last post
#1 Fri, 2016-06-03 18:00
h0tbird
  • h0tbird's picture
  • Offline
  • Last seen: 1 year 10 months ago
  • Joined: 2016-03-08

Hello there!

I am wondering why this command works in Alpine 3.3 but does not work in 3.4:

/portus # gem install mysql2 -v '0.3.18'
HEAD https://api.rubygems.org/api/v1/dependencies
200 OK
GET https://api.rubygems.org/api/v1/dependencies?gems=mysql2
200 OK
Getting SRV record failed: DNS result has no information for _rubygems._tcp.api.rubygems.org
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/README.md
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/client.c
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/client.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/extconf.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/infile.c
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/infile.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/mysql2_ext.c
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/mysql2_ext.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/mysql_enc_name_to_ruby.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/mysql_enc_to_ruby.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/result.c
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/result.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2/wait_for_single_fd.h
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2/client.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2/console.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2/em.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2/error.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2/result.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/lib/mysql2/version.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/support/libmysql.def
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/support/mysql_enc_to_ruby.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/support/ruby_enc_to_mysql.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/examples/eventmachine.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/examples/threaded.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/configuration.yml.example
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/em/em_spec.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/my.cnf.example
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/mysql2/client_spec.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/mysql2/error_spec.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/mysql2/result_spec.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/rcov.opts
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/spec_helper.rb
/usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/spec/test_data
Building native extensions. This could take a while...
current directory: /usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18/ext/mysql2
/usr/bin/ruby -r ./siteconf20160603-2998-1rq8m79.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
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... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... no
-----
mysqld_error.h is missing. please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.

Building has failed. See above output for more information on the failure.
To see why this extension failed to compile, please check the mkmf.log which can be found here:

/usr/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.3.18/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/lib/ruby/gems/2.3.0/gems/mysql2-0.3.18 for inspection.
Results logged to /usr/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.3.18/gem_make.out
/portus #

sh: syntax error: unexpected newline
/portus # <code>
sh: syntax error: unexpected newline
/portus # <code>
sh: syntax error: unexpected newline

Sat, 2016-06-04 07:37
AmatCoder
  • AmatCoder's picture
  • Offline
  • Last seen: 1 year 4 months ago
  • Joined: 2013-10-18

I am not sure but maybe it is because mariadb-libs was splitted in two packages: mariadb-libs and mariadb-client-libs.

See: http://git.alpinelinux.org/cgit/aports/commit/main/mariadb/APKBUILD?id=910011586e352662e691afcebd578829ec4f40b2

Log in or register to post comments