I'm trying to install Metasploit on my Raspberry Pi 2.
But when I try to execute this command:
gem install wirble sqlite3 bundler
I get this error:
Successfully installed wirble-0.1.3 Parsing documentation for
wirble-0.1.3 Done installing documentation for wirble after 2 seconds
Building native extensions. This could take a while... ERROR: Error
installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 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.1.0/gems/sqlite3-1.3.13 for inspection. Results logged
to
/var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/sqlite3-1.3.13/gem_make.out
Successfully installed bundler-1.15.4 Parsing documentation for
bundler-1.15.4 Done installing documentation for bundler after 73
seconds 2 gems installed
The system is missing ruby dev files. If you are using Debian
sudo apt-get install ruby-dev
should do the work.
Install ruby-dev using your package managers. (package name may differ across different linux distros)
Related
I'm currently having this problem when i try to install Rubocop(I can't install nokigiri either):
~$ sudo gem install rubocop
Building native extensions. This could take a while...
ERROR: Error installing rubocop:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/jaro_winkler-1.5.2/ext/jaro_winkler
/usr/bin/ruby2.5 -r ./siteconf20190320-24856-1cn9xqz.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.5.0/gems/jaro_winkler-1.5.2 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/jaro_winkler-1.5.2/gem_make.out
I've tried others solutions, but none worked.
Anyone knows why i'm getting this error ?
Thx
You need to install development headers for ruby 2.5, you don't have a development environment installed:
sudo apt-get install ruby2.5-dev
May also be called -devel depending on your packaging system.
I use Linux Mint and I want to install sass. I have installed ruby by "sudo apt install ruby" , version 2.3 and then , when I wan to install sass by "sudo gem install sass --no-user-install" , I have the following error:
Building native extensions. This could take a while...
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20171114-19329-157auxp.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/ffi-1.9.18 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.18/gem_make.out
Install this package:
sudo apt install ruby-dev
The ruby-dev package contains the missing headers. You can see that the installer is looking for the headers:
/usr/lib/ruby/include/ruby.h
Installing this package will install those headers. This is a common issue that comes up for new Ruby users when installing gems with native extensions. You may find that you have to install several packages to get the installation to complete. If you see similar errors when installing this gem or other gems, try searching for "gemname native extension prerequisites", like "sass gem native extension prerequisites", to learn which packages should be installed before installing the gem.
Try this:
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sass
I had the same issue on Ubuntu 18.04, ruby-dev itself didn't help, installing g++ and make, as stated here solved my issue.
I'm trying to install Jekyll using:
sudo gem install jekyll
but I get a error, I had found a solution on early mac version not for Sierra
this is the output:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.17/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20170117-1518-aaehhb.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.17 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/ffi-1.9.17/gem_make.out
thanks for advance!
You have to install the Ruby DevKit. Depending on your installation of Ruby, you have to select the correct way to install it.
I've set up the Brightbox Ruby 2.1.0 apt package and encountering a native compilation error installing json package.
$ sudo gem install json -v '1.8.1'
Fetching: json-1.8.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
I've installed ruby2.0-dev as mentioned here, but it puts the headers in a different folder (/usr/include/ruby-2.0.0/ruby, and copying them to /usr/lib/ruby/include didn't help). Any idea how to install this gem?
I imagine you'll need to install the ruby2.1-dev package, rather than ruby2.0-dev, if you're using Ruby 2.1. I've not used the Brightbox packages though, so I'm only guessing I'm afraid.
Windows 7 32bits
Hi everyone, how can I install mysql2 properly in windows 7 I have this error:
c:\dev\mysql2>gem install mysql2-0.3.13.gem --no-ri --no-rdoc -- --with-mysql-di r=c:\mysql-connector-c-noinstall-6.0.2-win32
This could take a while...
ERROR: Error installing mysql2-0.3.13.gem:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb --with-mysql-dir=c:\mysql-connector-c-noi
nstall-6.0.2-win32
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.
3.13 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/ext/mysql2/g
em_make.out
c:\dev\mysql2>
Try to install using different version, It's happens because sometime binary is not available for specific verion for window.
gem install mysql2 -v 0.2.6
If still you have issues, Try below steps.
1) Download the MySql C Connector from: http://dev.mysql.com/downloads/connector/c/
NOTE Don't download the installer, download the ARCHIVE for your OS
2) Extract the file to C:\mysql-connector
3) Then ran:
gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:\mysql-connector\lib" --with-mysql-include="C:\mysql-connector\include" --with-mysql-dir="C:\mysql-connector"'
It's works for me.