When i run:
sudo gem install yajl-ruby
I see errors:
Building native extensions. This could take a while...
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/yajl-ruby-1.2.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/yajl-ruby-1.2.1/ext/yajl/gem_make.out
I have installed yum install ruby rubygems ruby-devel, but still have this problem.
Try:
$ sudo ln -s /usr/bin/llvm-gcc /usr/bin/gcc-4.2
$ sudo gem install yajl-ruby
Related
I have no experience with Ruby. When I try to do gem install nokogiri on MacOS I am getting.
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.10.5/ext/nokogiri
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -I /Library/Ruby/Site/2.3.0 -r ./siteconf20191105-81089-x3wjwy.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.10.5 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.5/gem_make.out
Did you try?
gem update --system
xcode-select --install
The following should fix your issue:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
sudo xcodebuild -license accept
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
I'm trying to install the gem selenium-webdriver on Ubuntu 19.04 but I keep getting this error:
sudo gem install selenium-webdriver
Building native extensions. This
could take a while... ERROR: Error installing selenium-webdriver:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/childprocess-1.0.1/ext /usr/bin/ruby2.5 mkrf_conf.rb
current directory: /var/lib/gems/2.5.0/gems/childprocess-1.0.1/ext
/usr/bin/ruby2.5 -rrubygems
/usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake
RUBYARCHDIR\=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/childprocess-1.0.1
RUBYLIBDIR\=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/childprocess-1.0.1
/usr/bin/ruby2.5: No such file or directory --
/usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake
(LoadError)
rake failed, exit code 1
Gem files will remain installed in
/var/lib/gems/2.5.0/gems/childprocess-1.0.1 for inspection. Results
logged to
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/childprocess-1.0.1/gem_make.out
I have tried
sudo gem update --system
sudo apt install ruby-dev
sudo apt install build-essential
sudo apt install gcc
sudo apt install make
ruby -v ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]
gem -v 3.0.3
I had to do this
sudo gem pristine rake
Restoring gems to pristine condition... Cached gem for rake-12.3.1 not
found, attempting to fetch... Fetching rake-12.3.1.gem Restored
rake-12.3.1
I am trying to install nokogiri on Ubuntu Linux. I am running Ruby-2.1.1. I have installed.
Output:
sudo gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20181205-6502-3n3u4g.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/nokogiri-1.8.5 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.5/gem_make.out
Can anyone explain what I am missing?
Try installing Ruby 2.1.1 with rbenv and set it as default version in ubuntu:
rbenv install 2.1.1
rbenv global 2.1.1
After installing ruby, install the following packages:
sudo apt-get install libxslt-dev libxml2-dev zlib1g-dev
And then install nokogiri:
sudo gem install nokogiri
This should do the trick...
Good day
I have a Mac with OSX Yosemite
I'm trying to install the compass with the command:
sudo gem install compass
but I am getting the following error:
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151001-1122-1jqcu8r.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.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/ffi-1.9.10/gem_make.out
before attempting to install the package I updated the gem with the command
sudo gem update --system
and the update occurred without errors
You probably need to install the command line developer tools first.
xcode-select --install
Then try sudo gem install compass again
When I tried to install: gem install sqlite3-ruby it shows:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:3
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out
My environment:
sqlite: 2.8.17
rails: 3.0.0
ruby: 1.9.2
ubuntu: 10.04
gem: 1.3.7
I have looking all similiar question in webs and SO, nothing help, what should I do? :(
I had this same problem. I solved it by
sudo apt-get install sqlite3 libsqlite3-dev
Then the following command worked.
sudo gem install sqlite3-ruby