I cannot install the cocoapods to my Mac Catalina by the following command:
sudo gem install cocoapods
Here is the error message from the terminal:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20201117-5613-1jjoznr.rb extconf.rb
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--enable-system-libffi
--disable-system-libffi
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config'
from extconf.rb:9:in `system_libffi_usable?'
from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/mkmf.log
extconf failed, exit code 1
Here is the error shown at the /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/mkmf.log:
| pkg-config --libs libffi
=> "-lffi\n"
"xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L. -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/usr/local/lib -arch x86_64 -lruby.2.6 "
In file included from conftest.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks')
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
I have installed the Xcode 12.2(12B45b) to Mac and selected it as the Command Line Tools.
I am very confused with these messages. Thank you very much !!!
Checkout this post stackoverflow. If it doesn't work, try sudo less installation, here's the link for that cocoapods sudo less installation
I had the same problem. What happened for me is that my Mac didn't have the latest version of Ruby installed. If you update your Mac it should update to at least Ruby 2.7 which will be able to run the command successfully.
I had the same issue when configuring Flutter on MacOS and fixed it by using brew command :
brew install cocoapods
Related
I need to install older version of rails - 5.2.2 on Windows 10. I'm new to bash, so I went into this task blind, but I managed to install Ruby 2.5.0p0(which I also need). Now I've been stuck for few hours trying to figure out how to install rails.
After running:
$ gem install rails -v 5.2.2
I'm met with following error message:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby25/lib/ruby/gems/2.5.0/gems/racc-1.6.0/ext/racc/cparse
C:/Ruby25/bin/ruby.exe -r ./siteconf20220223-16448-scx6bw.rb extconf.rb
checking for rb_block_call()... *** 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=C:/Ruby25/bin/$(RUBY_BASE_NAME)
C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:541:in `try_link0'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:559:in `try_link'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:770:in `try_func'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:1057:in `block in have_func'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:947:in `block in checking_for'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:350:in `block (2 levels) in postpone'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:320:in `open'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:350:in `block in postpone'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:320:in `open'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:346:in `postpone'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:946:in `checking_for'
from C:/Ruby25/lib/ruby/2.5.0/mkmf.rb:1056:in `have_func'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby25/lib/ruby/gems/2.5.0/extensions/x86-mingw32/2.5.0/racc-1.6.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby25/lib/ruby/gems/2.5.0/gems/racc-1.6.0 for inspection.
Results logged to C:/Ruby25/lib/ruby/gems/2.5.0/extensions/x86-mingw32/2.5.0/racc-1.6.0/gem_make.out
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
The mkmf log:
"i686-w64-mingw32-gcc -o conftest.exe -IC:/Ruby25/include/ruby-2.5.0/i386-mingw32 -IC:/Ruby25/include/ruby-2.5.0/ruby/backward -IC:/Ruby25/include/ruby-2.5.0 -I. -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=generic -O2 -pipe conftest.c -L. -LC:/Ruby25/lib -L. -pipe -lmsvcrt-ruby250 -lgmp -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
I'm using git bash in case that matters.
The problem occurred when ruby was installed using sudo apt install ruby.
Solution: Install ruby via RVM.
I'm a newbie in ruby and rails development. I know that rails uses sqlite3 as default, so I want to try using postgres as defalut. I've downloaded postgres, jruby, ruby 2.5.1, rails 5.2.1. I've intalled ruby devkit with ruby dk.rb init/install. I'm stumbled into the wall when I try to install pg gem, I get the following output:
Building native extensions. This could take a while...
C:/jruby-9.1.17.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:58: warning: Tempfile#unlink or delete called on open file; ignoring
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: C:/jruby-9.1.17.0/lib/ruby/gems/shared/gems/pg-1.1.3/ext
C:/jruby-9.1.17.0/bin/jruby.exe -r ./siteconf20180918-6200-16mdyzt.rb extconf.rb
checking for pg_config... yes
Using config values from C:\postgres\bin/pg_config.exe
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.
try_do at C:/jruby-9.1.17.0/lib/ruby/stdlib/mkmf.rb:456
try_link0 at C:/jruby-9.1.17.0/lib/ruby/stdlib/mkmf.rb:541
try_link at C:/jruby-9.1.17.0/lib/ruby/stdlib/mkmf.rb:556
<main> at extconf.rb:40
*** 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=C:/jruby-9.1.17.0/bin/jruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/jruby-9.1.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.3.0/pg-1.1.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/jruby-9.1.17.0/lib/ruby/gems/shared/gems/pg-1.1.3 for inspection.
Results logged to C:/jruby-9.1.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.3.0/pg-1.1.3/gem_make.out
mkmf.log contains:
find_executable: checking for pg_config... -------------------- yes
--------------------
" -o conftest.exe -I/include/universal-java1.8 -IC:/jruby-9.1.17.0/lib/ruby/include/ruby/backward -IC:/jruby-9.1.17.0/lib/ruby/include -I. -IC:/postgres/include -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions conftest.c -L. -LC:/jruby-9.1.17.0/lib -LC:/postgres/lib -LC:/jruby-9.1.17.0/lib/native/x86_64-Windows -m64 -march=native -mtune=native "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4: int main(int argc, char **argv)
5: {
6: return 0;
7: }
/* end */
Have you installed postgres package in your system You can install in linux using command
sudo apt-get install postgresql postgresql-contrib
if you are using debian system
The error clearly states that that you need to install development tools so you may have likely missed installing some dependencies
You can install through command line utitlities using the commands
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://s3.amazonaws.com/pgcentral/install.ps1'))"
cd bigsql
pgc install pg10
pgc start pg10
Please follow this link to configure postgress in windows
To install postgres client, please refer to this stackoverflow link and also try to install pg gem by specifying the path of pgconfig file you can refer to this
link for example
I am trying to install puma onto my MacOS 10.13.6. To install puma, I run the command gem install puma but it returned
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
current directory: /Users/salem/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/puma-3.12.0/ext/puma_http11
/Users/salem/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20180801-14654-17z0n88.rb extconf.rb
checking for BIO_read() in -lcrypto... *** 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=/Users/salem/.rbenv/versions/2.5.1/bin/$(RUBY_BASE_NAME)
--with-puma_http11-dir
--without-puma_http11-dir
--with-puma_http11-include
--without-puma_http11-include=${puma_http11-dir}/include
--with-puma_http11-lib
--without-puma_http11-lib=${puma_http11-dir}/lib
--with-openssl-dir
--with-openssl-include
--without-openssl-include=${openssl-dir}/include
--with-openssl-lib
--without-openssl-lib=${openssl-dir}/lib
--with-cryptolib
--without-cryptolib
/Users/salem/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
...
...
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/salem/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/puma-3.12.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/salem/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/puma-3.12.0 for inspection.
Results logged to /Users/salem/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/puma-3.12.0/gem_make.out`
The _mkmf.log_ can be found below...
clang -o conftest -I/Users/salem/.rbenv/versions/2.5.1/include/ruby-2.5.0/x86_64-darwin17 -I/Users/salem/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/backward -I/Users/salem/.rbenv/versions/2.5.1/include/ruby-2.5.0 -I. -I/usr/local/opt/openssl/include -I/Users/salem/.rbenv/versions/2.5.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/Users/salem/.rbenv/versions/2.5.1/lib -L/usr/local/opt/openssl/lib -L. -L/Users/salem/.rbenv/versions/2.5.1/lib -fstack-protector -L/usr/local/lib -lruby.2.5.1-static -framework Foundation -lpthread -ldl -lobjc "
error: unable to open output file '~/tmp/conftest-8ad96a.o': 'No such file or directory'
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
Xcode is installed on my Mac. I ran xcode-select --install which confirmed that Xcode was already installed.
I then thought it could be a permissions issue...
~ $ ls -lah tmp
total 0
drwxrwxrwx 3 salem staff 96B Jul 30 08:35 .
drwxr-xr-x+ 62 salem staff 1.9K Aug 1 13:17 ..
drwxr-xr-x 3 salem staff 96B Jul 27 15:11 vmSWVyg
but it appears that it has the correct permissions set.
This issue also arises when installing nokugiri
You might want to install openssl, e.g. via homebrew:
brew install openssl
A similar issue was also discussed on github.
In case of nokogiri, libxml might be missing:
brew install libxml2
I installed ruby and ruby gems, updated both of them, tried to install jekyll using the command
sudo gem install jekyll bundler
it gave me this
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.14/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20161209-4826-wdshax.rb extconf.rb
checking for ffi.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-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/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:1091:in `block in have_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:1090:in `have_header'
from extconf.rb:16: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_64-linux/2.3.0/ffi-1.9.14/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.14 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.14/gem_make.out
Successfully installed bundler-1.13.6
Parsing documentation for bundler-1.13.6
Done installing documentation for bundler after 7 seconds
1 gem installed
Here is what it says in the log file:
package configuration for libffi is not found
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
In file included from /usr/include/ruby-2.3.0/ruby/ruby.h:36:0,
from /usr/include/ruby-2.3.0/ruby.h:33,
from conftest.c:1:
/usr/include/ruby-2.3.0/ruby/defines.h:26:19: fatal error: stdio.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
I'm running Linux Mint, and I can't find anything to help this problem. One gem of jekyll is installed and I'm able to create jekyll projects, but only partially and I can't run it on my local host and edit it.
Any more questions let me know and I'll try my best to help provide the details.
I had the same problem on Linux Mint 18. Installing build-essential solved it:
sudo apt-get install build-essential
I've been there. Some linux need custom treatment till get done to do something.
You can try to
bundle exec jekyll serve --trace
If you pass, you will find url like this: http://127.0.0.1:4000/
when installing Rails, everything was good but then, i write:
rails -v
and the output:
/home/toshiba/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails/cli (LoadError)
from /home/toshiba/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/bin/rails:7:in `<main>'
everyone know how to do it?
I used this tutorial: http://installfest.railsbridge.org/
and yes, i run:
gem install rails
I noticed that when i run install rails this thing is pop up
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/home/toshiba/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150816-3818-sm5w21.rb extconf.rb
checking if the C compiler accepts -ggdb3 -O0 -std=c99 -Wall -Werror... yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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=/home/toshiba/.rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
extconf failed, exit code 1
Gem files will remain installed in /home/toshiba/.rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /home/toshiba/.rvm/gems/ruby-2.2.1/extensions/x86_64-linux/2.2.0/nokogiri-1.6.6.2/gem_make.out
It seems bad
I've fixed this problem by
sudo apt-get install zlib1g-dev
This pops up in your install process:
zlib is missing; necessary for building libxml2
I guess you need to sudo apt-get install libxml2.
Edit I got downvoted and probably the answer about installing zlib is (more?) correct. I wonder if installing libxml2 (or libxml2-dev) would have helped as well, there was unfortunately no comment about output of that experiment.