Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails #174

Closed
9daccad9 opened this issue Feb 17, 2019 · 8 comments
Closed

Installation fails #174

9daccad9 opened this issue Feb 17, 2019 · 8 comments

Comments

@9daccad9
Copy link

Dear Community,
I've got a Problem during the Installation of timetrap. I want to install on debian "stretch" Linux.
First I installed with "apt-get" the package ruby. I think that was ok - here a Listing of dpkg:

roman@luna:~$ dpkg -l | fgrep ruby
ii  libruby2.3:i386              2.3.3-1+deb9u4                 i386         Libraries necessary to run Ruby 2.3
ii  rake                         10.5.0-2                       all          ruby make-like utility
ii  ruby                         1:2.3.3                        i386         Interpreter of object-oriented scripting language Ruby (default version)
ii  ruby-did-you-mean            1.0.0-2                        all          smart error messages for Ruby > 2.3
ii  ruby-minitest                5.9.0-1                        all          Ruby test tools supporting TDD, BDD, mocking, and benchmarking
ii  ruby-net-telnet              0.1.1-2                        all          telnet client library
ii  ruby-power-assert            0.3.0-1                        all          library showing values of variables and method calls in an expression
ii  ruby-test-unit               3.1.7-2                        all          unit testing framework for Ruby
ii  ruby2.3                      2.3.3-1+deb9u4                 i386         Interpreter of object-oriented scripting language Ruby
ii  rubygems-integration         1.11                           all          integration of Debian Ruby packages with Rubygems

Then I chanched to root and made the command as described:

root@luna:/home/roman# gem install timetrap
Fetching: sequel-4.43.0.gem (100%)
Successfully installed sequel-4.43.0
Fetching: sqlite3-1.3.13.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing timetrap:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/sqlite3-1.3.13/ext/sqlite3
/usr/bin/ruby2.3 -r ./siteconf20190217-1485-soxe1d.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/sqlite3-1.3.13 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/sqlite3-1.3.13/gem_make.out

What did I made wrong? Do I have to download anything before using the command "gem
install timetrap"?

Can anyone help me?

@patrickdavey
Copy link
Contributor

You may need to install the dev packages with sudo apt-get install ruby2.3-dev (googling for "mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h" the first hit is that stack overflow page :) )

If that doesn't work, I often find these issues go away if you install ruby using rvm it seems to do a really good job of making sure all the dependencies are installed correctly.

Good luck - let us know what works!

@9daccad9
Copy link
Author

I have installed the package ruby-dev, but still there are problems when trying to install timetrap:

root@luna:/home/roman# gem install timetrap
Building native extensions.  This could take a while...
ERROR:  Error installing timetrap:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/sqlite3-1.3.13/ext/sqlite3
/usr/bin/ruby2.3 -r ./siteconf20190218-766-11ha94p.rb extconf.rb
checking for sqlite3.h... *** 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
        --with-sqlite3-config
        --without-sqlite3-config
        --with-pkg-config
        --without-pkg-config
        --with-sqlite3-dir
        --without-sqlite3-dir
        --with-sqlite3-include
        --without-sqlite3-include=${sqlite3-dir}/include
        --with-sqlite3-lib
        --without-sqlite3-lib=${sqlite3-dir}/lib
/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:587:in `try_cpp'
        from /usr/lib/ruby/2.3.0/mkmf.rb:1144:in `block in find_header'
        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:1143:in `find_header'
        from extconf.rb:50: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-linux/2.3.0/sqlite3-1.3.13/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/sqlite3-1.3.13 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/sqlite3-1.3.13/gem_make.out

Using rvm seems to difficult for me. Although I have some experience in linux, I have really no knowledge in ruby

@fdornak
Copy link

fdornak commented Feb 18, 2019

I had same problem, after installing
sudo apt install ruby-dev && sudo apt install libsqlite3-dev
installation of timetrap finished successfully

@9daccad9
Copy link
Author

I have now also installed libsqlite3-dev, but there are still errors while installing timetrap ...
Cause I am no expert on ruby, so I will try another program ....
Thank you for your help!

@jerith666
Copy link

FWIW timetrap is packaged for nix; it will manage all the gory details of all the dependencies for you. Just install nix then nix-env -i timetrap.

@categulario
Copy link
Collaborator

dependencies have been upgraded, closing for now. Feel free to file a new issue or re-open this one if it happens again.

@JezzaHehn
Copy link

JezzaHehn commented Jun 23, 2021

I've been using timetrap for years (fantastic program, thanks a million to all the devs involved) and have had this install issue a few times. Today I installed Ubuntu 20.04 and received a matching error and a similar experience — installed ruby-dev, libsqlite3-dev but it wasn't enough.

The fix for me was found at this stackexchange post.

sudo apt-get install ubuntu-dev-tools

and now the gem installed perfectly. It's a bit of a large package for this, but I anticipate this is a version-specific dependency issue. Hopefully this might save future users some searching. :)

@categulario
Copy link
Collaborator

hi @JezzaHehn, thanks for posting your solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants