Trying to install Jekyll but keep getting this error message:
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180219-16974-6pgqng.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR=" clean
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR="
Running autoreconf for libffi
/var/lib/gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: 2: exec: autoreconf: not found
libffi.mk:6: recipe for target '"/var/lib/gems/2.3.0/gems/ffi- 1.9.21/ext/ffi_c/libffi-x86_64-linux-gnu"/.libs/libffi_convenience.a' failed
make: *** ["/var/lib/gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux-gnu"/.libs/libffi_convenience.a] Error 127
make failed, exit code 2
I have installed the following but perhaps not in this order
make
build-essential
ruby
ruby-dev
gcc
Any ideas?
Solved!
had to run the command:
sudo apt-get install autoconf libtool
Related
When I am trying to run bundle install on macOs , I got error on
An error occurred while installing em-udns (0.3.6.2), and Bundler cannot continue.
Make sure that `gem install em-udns -v '0.3.6.2' --source '{sourcepath}'` succeeds before bundling.
After the open of log files I am find the
"tar zxf /Users/user/.rbenv/versions/2.5.9/lib/ruby/gems/2.5.0/gems/em-udns-0.3.6.2/ext/udns-0.4-patched.tar.gz"
./configure
configure... udns package
checking for C compiler... gcc
checking whenever C compiler (gcc) is GNU CC... yes
checking whenever the C compiler (gcc -Wall -W -O2 -pipe)
can produce executables... yes
checking for ranlib... ranlib
checking for getopt()... yes
checking for libraries needed for socket and connect... not found
configure: fatal: cannot find libraries needed for sockets**
how can I fix the issue ?
EDIT: I wrote up a more detailed solution on my blog here if you want to walk through all the steps.
I'm trying to install Jekyll via gem install Jekyll on macOS Catalina using Ruby install via homebrew and located at /usr/local/opt/ruby/bin/ruby and I'm running into the following error
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c
/Users/foobar/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20181118-49440-k8mjki.rb
extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile
current directory:
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR=" clean
current directory:
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR="
Running autoreconf for libffi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at
/usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
make: ***
["/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-darwin18"/.libs/libffi_convenience.a]
Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.9.21 for inspection.
Results logged to
/Users/foobar/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0-static/ffi-1.9.21/gem_make.out
An error occurred while installing ffi (1.9.21), and Bundler cannot continue.
I've already tried updating my Xcode Command Line tools via xcode-select --install but I got back the following message:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Does anyone know how I can build libffi on my machine so that I Jekyll can use it as a dependency?
Aaaaaand I figured it out! Credit to #ffleming here. Here's what you need to do:
reinstall libffi on brew using brew reinstall libffi
add the new brew-installed libffi flags to your shell instance, e.g.
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
Run gem install jekyll and you should be sorted!
While I'm trying to install rmagic, it shows following error
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/***/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20170814-
44982-1i5w4mc.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.15.4. Can't find MagickWand.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.
I'm using MacOS sierra, ruby version 2.2.3
I had this issue a while back. You need to install imagemagick. Per the github repo for the rmagic gem
Pre-reqs:
ImageMagick Version 6.4.9 or later. You can get ImageMagick from www.imagemagick.org.
I believe you can also install it with brew
$ brew install imagemagick#6
$ brew link imagemagick#6 --force
$ gem install rmagick
brew unlink pkgconfig
bundle install
brew link pkgconfig
did the trick for me
I have found several threads where other users have had similar issues but none of them are seem to be like this.
After issuing the command:
rbenv install 2.1.3
I get the following errors:
Installing ruby-2.1.3...
BUILD FAILED (OS X 10.10 using ruby-build 20140926)
Inspect or clean up the working tree at /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586
Results logged to /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586.log
Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS=" -O3 -Wno-error=shorten-64-to-32 "
make: *** No targets specified and no makefile found. Stop.
The Homebrew package for gcc on Yosemite seems to be broken. That's why it doesn't work.
Had the same issue. Running:
CC=/usr/bin/gcc rbenv install 2.1.3
worked for me.
This has been fixed in ruby-build for rbenv. Please update by the following:
cd ~/.rbenv/plugins/ruby-build/
git pull
I am not able to install Nokogiri on my Mac running Mountain Lion.
I tried to install it using command:
gem install nokogiri -v '1.6.0'
I get this output:
Building native extensions. This could take a while...
/usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby193/1.9.3-p448/bin/ruby extconf.rb
/usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.1/lib/mini_portile.rb:215: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12.5.0/libxslt/1.1.26)...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
make
compiling html_document.c
gcc-4.7: error: unrecognized command line option '-Wshorten-64-to-32'
make: *** [html_document.o] Error 1
Gem files will remain installed in /usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0 for inspection.
Results logged to /usr/local/Cellar/ruby193/1.9.3-p448/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
Can anyone please help me?
I was getting the same error with 1.6.1. I solved this on OS X Mavericks by switching to llvm-gcc.
CC=llvm-gcc gem install nokogiri -v '1.6.1'