2

when i tried installing redmine with bundle install --without development test I received this build error:

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...................................
Installing rake 10.3.2
...(and so on)

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/pi/.rubies/ruby-2.1.5/bin/ruby 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()... 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... yes
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
*** 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.

...

Gem files will remain installed in /home/pi/.gem/ruby/2.1.5/gems/mysql2-0.3.17 for inspection.
Results logged to /home/pi/.gem/ruby/2.1.5/extensions/armv6l-linux/2.1.0-static/mysql2-0.3.17/gem_make.out
An error occurred while installing mysql2 (0.3.17), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.17'` succeeds before bundling.

I've tried reading .gem/ruby/2.1.5/extensions/armv6l-linux/2.1.0-static/mysql2-0.3.17/mkmf.log which is full of gcc code checking output with error messages similar in those present in basic output which I've posted abowe.

I've also tried executing command from error message (gem install mysql2 -v '0.3.17') but of course this also failed with same result. What can be the source of those errors? I am rather new to linux environment so I let automats do everything for me and I'm following guides (this one in this case)

Can there be a problem with mysql that is already installed by apt-get along with apache?

P.S. It is raspbian/debian distro.

2

found a solution

what solved my problem is one (or both) of those two installations:

sudo apt-get install libmysql-ruby
sudo apt-get install libmysqlclient-dev

probably the later one

i have installed both before checking, so i can't be sure

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.