This forum is no longer active. Please post your questions to our new community site

Errors when installing data mapper

Subscribe to Errors when installing data mapper 6 post(s), 2 voice(s)

 
Avatar javaruby 4 post(s)

From the following error (and also btw when trying to install mongo..) what are “developer tools” and how do i install them?

root@linux:~# gem install data_objects do_mysql do_postgres do_sqlite3
Successfully installed data_objects-0.10.5
Building native extensions. This could take a while…
ERROR: Error installing do_mysql:
ERROR: Failed to build gem native extension.

/opt/bitnami/ruby/bin/ruby extconf.rb
checking for main() in -lmysqlclient… * 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=/opt/bitnami/ruby/bin/ruby
—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
/opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:368:in `try_do’: The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:440:in `try_link’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:552:in `try_func’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:748:in `block in have_library’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:276:in `postpone’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for’
from /opt/bitnami/ruby/lib/ruby/1.9.1/mkmf.rb:743:in `have_library’
from extconf.rb:56:in `block in ’
from extconf.rb:55:in `each’
from extconf.rb:55:in `’

Gem files will remain installed in /opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/do_mysql-0.10.5 for inspection.
Results logged to /opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/do_mysql-0.10.5/ext/do_mysql/gem_make.out
Building native extensions. This could take a while…
ERROR: Error installing do_postgres:
ERROR: Failed to build gem native extension.

/opt/bitnami/ruby/bin/ruby extconf.rb
checking for main() in -lpq… * 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.

 
Avatar javaruby 4 post(s)

This vm appears to be a piece of garbage. It is missing TONS of basic ubuntu stuff.

aptitude is not there. dev-tools are not there. I can’t even install them.

Following are

aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf

(aptitude not found)
apt-get aptitude

E: Package ‘aptitude’ has no installation candidate

apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf

Reading package lists… Done
Building dependency tree
Reading state information… Done
Package zlib1g-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package build-essential
E: Unable to locate package bison
E: Unable to locate package libreadline6-dev
E: Unable to locate package curl
E: Unable to locate package git-core
E: Package ‘zlib1g-dev’ has no installation candidate
E: Unable to locate package libyaml-dev
E: Unable to locate package libsqlite3-dev
E: Unable to locate package sqlite3
E: Unable to locate package libxml2-dev
E: Unable to locate package libxslt-dev
E: Unable to locate package autoconf
root@linux:~#

NOTHING works here.

Now if I am being too harsh, then fine show how to make this ‘jruby stack’ actually run ruby/jruby/rails/gems..

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Ok some comments:

To install packages you can use “apt-get” but it is necessary to run “apt-get update” before.

To install gems that it requires compiation you have to specify the folders:

gem install do_mysql — —with-mysql-dir /opt/bitnami/mysql

It is also necessary to install compilation tools. We do not ship in the virtual appliance because it is not necessary to most of the applications.

 
Avatar javaruby 4 post(s)

Hola Beltran,

I had done apt-get update already several times. This distribution is not useful for someone doing hardcore development.

Which Bitnami distribution would you recommend. The MOST IMPORTANT thing is it has full development env needed for C/C++ development so that I can build native extensions. This one apparently does not.

Do any of your Rails 3.x / ubuntu 10.04/10.10 (or even mysql 5.x / ubuntu 10.x) distro’s have a proper development setup – that is a ‘rich’ (not hobbled) ubuntu backing it up?

If not, then I need to revert to a vanilla FULL-INSTALL ubuntu 10.X distro. Which one(s) could I go for? I don’t want any more surprises about the operating system being underpowered.

thanks,
stephenb

 
Avatar javaruby 4 post(s)

Hi again
All of the Bitnami VM’s say

" BitNami Virtual Appliances contain a minimal Linux operating system …"

I need a ‘rich’ Linux o/S not a minimal one.. So does that mean i should stay away from Bitnami VM’s if I want to do native c/c++ development – or simply to compile distro’s from source?

What VM’s (even if not bitnami) can i get that have a developer-friendly Ubuntu that I can trust?

thanks

stephenb

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

I would recommend BitNami RubyStack and then install the build-essential package using apt-get, so you can compile and install any package on top of it.