I am having Jekyll installation error in termux on my android phone. When I am trying to install it's failing to build gem native extension for termux....Jekyll installation code in termux
Apparently the Termux Wiki has documented the following with Jekyll as an example:
Instructions
Firstly you need to install all packages in the "pkg requirements" row. Example for Jekyll:
pkg install ruby clang make libffi
Then you need to follow the special instructions. If no special instructions are given, you can install the package with:
gem install jekyll
Note (friendly reminder) for the gems that build native extensions make sure you have a build environment ready; a minimum can be achieved by running:
pkg install autoconf build-essential
Related
I tried to install a package using RubyGems (please note that I use Windows Subsystem for Linux). I was going to install Jekyll package.
I typed $ gem install jekyll. After that it came up with an error:
Building native extensions. This could take a while...
/usr/lib/ruby/2.5.0/rubygems/ext/builder.rb:76: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
Can you please explain the error and any possible ways to fix it?
You need to install the build tools needed:
sudo apt-get update
sudo apt-get install build-essential
I had to install ruby-full to get this working on WSL:
sudo apt install ruby-full
I'm trying to install SASS on Codeanywhere project.
The process is explained here: http://docs.codeanywhere.com/advancedtopics/sass.html
I have succed to install ruby with first command but when I call second command
sudo gem install sass
get this error
If I call only...
gem install sass
get this error
What to do?
exec: autoreconf: not found
It looks like you're missing autoreconf. It's present in the Ubuntu autoconf package:
sudo apt-get install autoconf
Trying to install sass within a bit bucket pipelines docker instance and getting the error Failed to build gem native extension
The logs show the following:
gem install sass --no-user-install
Successfully installed rb-fsevent-0.10.2
Building native extensions. This could take a while...
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.
I am using a image php:7.1.1
Ruby and Gem should be installed as in my script I run:
apt-get update && apt-get install -y unzip nodejs ruby-full
gem install sass --no-user-install
Thanks in advance
I had the same problem. The following packages have solved the problem:
apt-get install -y ruby-dev gcc automake libtool rubygems build-essential
Best regards
I noticed this error today too using gitlab-ci with a docker image based on php:7.0.
I tried installing ruby-dev and doing a gem update --system first as I found in another SO solution and it didn't fix the error.
Sorry i couldn't post this as a comment, my reputation is too low, but I wanted you to know you're not alone. Hopefully this is a gem toolchain issue that gets fixed quickly.
I tried to install rmagick using these commands, but it doesn't work.
sudo apt-get install imagemagick
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
sudo gem install rmagick
It ended up with the following error.
Building native extensions.
This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick /usr/bin/ruby2.3
-r ./siteconf20170603-20826-3to4j3.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/rmagick-2.16.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
You need to install also the ruby-dev package. That is why the ruby.h is not found when compiling a native extension.
Use the following command to install it.
sudo apt-get install ruby-dev
Basing on the package description, that will install the ruby2.3-dev package. That was the package it installed on my Ubuntu 16.04.
Package: ruby-dev
State: not installed
Multi-Arch: same
Version: 2:2.3.0+1bbox1~xenial1
Priority: optional
Section: devel
Maintainer: Antonio Terceiro
Architecture: amd64
Uncompressed Size: 20.5 k
Depends: ruby2.3-dev
Provided by: ruby1.8-dev (1:1.8.7.375-1bbox1~xenial2)
Description: Header files for compiling extension modules for Ruby (default version) Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in perl). It is simple, straight-forward, and extensible. This package contains the header files and the mkmf library, necessary to make extension library for Ruby. It is also required to build many gems. This package is a dependency package, which depends on Debian's default Ruby version (currently v2.3).
I then installed Ruby 2.4, so now that package doesn't result installed on my computer.
I bought a new Mac this week and have had big problems getting this gem installed. It was never a problem on my old Mac but seems to be particularly difficult on this one.
I have installed libvirt via Homebrew, Xcode4.4 (with command line tools) and gcc4.2. I have symlinked to make gcc4.2 the default compiler.
gem install ruby-libvirt -v '0.4.0' fails because it cannot find the headers
If I pass in the paths to the headers and libraries, like so:
ruby-libvirt -v '0.4.0' -V -- --with-libvirt-include=/usr/local/Cellar/libvirt/0.9.11.3/include/ --with-libvirt-lib=/usr/local/Cellar/libvirt/0.9.11.3/lib/
, it compiles just fine but fails when linking with the following errors:
linking shared-object _libvirt.bundle
ld: library not found for -lruby.1.9.1
collect2: ld returned 1 exit status
make: *** [_libvirt.bundle] Error 1
I have installed Ruby 1.9.3 via RVM and haven't had any troubles installing other native extensions, so I cannot see why it fails to find the ruby libraries in this case.
Does anyone have any ideas? Help would be much appreciated.
I built ruby-libvirt-0.4.0/ext/libvirt by proving external libvirt installed using brew.
Here is what I did to successfully install libvirt.
brew install libvirt
ruby extconf.rb --with-libvirt-include=/usr/local/include/libvirt --with-libvirt-lib=/usr/local/lib/libvirt
gem install ruby-libvirt -v '0.4.0' -V -- --with-libvirt-include=/usr/local/Cellar/libvirt/1.1.4/include/libvirt --with-libvirt-lib=/usr/local/Cellar/libvirt/1.1.4/lib
Hope this helps.
To install the gem you need to install the libvirt libraries. Using 'Homebrew' (a package manager for mac) :
brew install libvirt
bundle install
The exact error you got might have been:
An error occurred while installing ruby-libvirt (0.4.0)
I have finally solved this. It turns out that the command line tools were not properly installed. The following line needs to be added to your .zshrc file (or whatever applies to your choice of shell):
export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH
You need only to install libvirt, before the bundle install.
brew install libvirt