Closed 9daccad9 closed 4 years ago
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!
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
I had same problem, after installing
sudo apt install ruby-dev && sudo apt install libsqlite3-dev
installation of timetrap finished successfully
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!
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
.
dependencies have been upgraded, closing for now. Feel free to file a new issue or re-open this one if it happens again.
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. :)
hi @JezzaHehn, thanks for posting your solution
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:
Then I chanched to root and made the command as described:
What did I made wrong? Do I have to download anything before using the command "gem install timetrap"?
Can anyone help me?