Problems during Redmine installation on Ubuntu

Published on
Aug 5, 2011

Some patience is required to successfully install the Redmine. But some people are just like me - don't have it, especially when doing something for fun on their free time. If you encountered similar issues (and probably you did, if you googled for this article) - read next on how easily this can be fixed.

Generally, the errors appear when you try to execute

RAILS_ENV=production rake db:migrate 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.

Then below some message appears about the missing i18n gem, but when you try to install it, another error tells in some way that you need to install mysql gem, maybe something like this:

# gem install mysql Fetching: mysql-2.8.1.gem (100%) Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb 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

And as any good boy or girl, you're running these lines one after another, and then install the i18n gem, and then repeat the first problematic line.

apt-get install build-essential apt-get install libmysqlclient15-dev updatedb locate mysql_config gem install mysql -- --with-mysql-dir=/usr/bin/mysql_config # <-- well, the path of yours, from the previous line's output!

Now try:

RAILS_ENV=production rake db:migrate ~HTH