Bringerr Inc.

Problems during Redmine installation on Ubuntu


From 2011-08-06

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

Add new comment

Filtered HTML

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr><br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong><font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre><address> <code><cite> <embed> <object> <param> <strike> <caption>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.