anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
315 stars 82 forks source link

Impossible to install on Debian 9 #180

Open AdrienV opened 5 years ago

AdrienV commented 5 years ago

Hi,

Working on Debian GNU/Linux 9.6 (stretch), I tried to install ruby and mongify but I get an error. Could you help please ?

Install :
sudo apt install ruby-full gem install mongify

Error :
`ERROR: Error installing mongify:

    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/bson_ext-1.12.5/ext/cbson
/usr/bin/ruby2.3 -r ./siteconf20191019-2481-vawipe.rb extconf.rb
checking for asprintf()... *** 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)2.3
/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
    from /usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
    from /usr/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
    from /usr/lib/ruby/2.3.0/mkmf.rb:1051:in `block in have_func'
    from /usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
    from /usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
    from /usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
    from /usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
    from /usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
    from /usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
    from /usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
    from /usr/lib/ruby/2.3.0/mkmf.rb:1050:in `have_func'
    from extconf.rb:3:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/bson_ext-1.12.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/bson_ext-1.12.5 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/bson_ext-1.12.5/gem_make.out

If I try to open this, it doesn't exists :( tail -f /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/bson_ext-1.12.5/mkmf.lo

anlek commented 5 years ago

Seems like you have to install build-essential Run: sudo apt install build-essential

Let me know how it goes.