gitreflow: [SOLVED] Unable To Install the GEM (install nokogiri manually to solve the issue)
I have been looking forward to using GitReflow and today I ended up installing it. I think I had some issues which are listed below since the gem was not installed. Can you guide me how to get it done?
sudo gem install git_reflow
Password:
Fetching: simple_oauth-0.3.1.gem (100%)
Successfully installed simple_oauth-0.3.1
Fetching: mini_portile2-2.0.0.gem (100%)
Successfully installed mini_portile2-2.0.0
Fetching: nokogiri-1.6.7.2.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing git_reflow:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/ext/nokogiri
/usr/local/opt/ruby/bin/ruby -r ./siteconf20160527-22094-1ttq2lr.rb extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
Using mini_portile version 2.0.0
checking for iconv.h... yes
checking for gzdopen() in -lz... yes
checking for iconv using --with-opt-* flags... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.2
with the following patches applied:
- 0001-Revert-Missing-initialization-for-the-catalog-module.patch
- 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
- 0003-Stop-parsing-on-entities-boundaries-errors.patch
- 0004-Cleanup-conditional-section-error-handling.patch
- 0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
- 0006-Another-variation-of-overflow-in-Conditional-section.patch
- 0007-Fix-an-error-in-previous-Conditional-section-patch.patch
- 0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
- 0009-Updated-config.guess.patch
- 0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch
- 0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch
- 0012-Avoid-processing-entities-after-encoding-conversion-.patch
- 0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch
- 0014-CVE-2015-5312-Another-entity-expansion-issue.patch
- 0015-Add-xmlHaltParser-to-stop-the-parser.patch
- 0016-Detect-incoherency-on-GROW.patch
- 0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch
- 0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch
- 0019-Do-not-print-error-context-when-there-is-none.patch
- 0020-xmlStopParser-reset-errNo.patch
- 0021-Reuse-xmlHaltParser-where-it-makes-sense.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.2.tar.gz into tmp/x86_64-apple-darwin15.4.0/ports/libxml2/2.9.2... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0009-Updated-config.guess.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0012-Avoid-processing-entities-after-encoding-conversion-.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0015-Add-xmlHaltParser-to-stop-the-parser.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0016-Detect-incoherency-on-GROW.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0019-Do-not-print-error-context-when-there-is-none.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0020-xmlStopParser-reset-errNo.patch... OK
Running git apply with /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0021-Reuse-xmlHaltParser-where-it-makes-sense.patch... OK
Running 'configure' for libxml2 2.9.2... ERROR, review '/usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-apple-darwin15.4.0/ports/libxml2/2.9.2/configure.log' to see what happened. Last lines are:
========================================================================
checking for iconv.h... yes
checking for iconv... no
checking for iconv in -liconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
Disabling ICU support
Enabled Schemas/Relax-NG support
checking for printf... yes
checking for sprintf... yes
checking for fprintf... yes
checking for snprintf... yes
checking for vfprintf... yes
checking for vsprintf... yes
checking for vsnprintf... yes
checking for sscanf... yes
Disabling code coverage for GCC
checking that generated files are newer than configure... done
configure: creating ./config.status
sed: 1: "s/.*%!_!# !%!_!# _%!_! ...": unterminated substitute pattern
configure: error: could not make ./config.status
========================================================================
*** 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
--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/local/Cellar/ruby/2.3.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
/usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete configure task (RuntimeError)
from /usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'
from /usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `execute'
from /usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:106:in `configure'
from /usr/local/lib/ruby/gems/2.3.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:149:in `cook'
from extconf.rb:289:in `block (2 levels) in process_recipe'
from extconf.rb:182:in `block in chdir_for_build'
from extconf.rb:181:in `chdir'
from extconf.rb:181:in `chdir_for_build'
from extconf.rb:288:in `block in process_recipe'
from extconf.rb:187:in `tap'
from extconf.rb:187:in `process_recipe'
from extconf.rb:478:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/nokogiri-1.6.7.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/nokogiri-1.6.7.2/gem_make.out
✘ ✝ ~ git reflow setup
WARNING: You called a Git command named 'reflow', which does not exist.
Continuing under the assumption that you meant 'reflog'
in 0.1 seconds automatically...
fatal: Not a git repository (or any of the parent directories): .git
✘ ✝ ~
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 5
- Comments: 18
I’d try to install nokogiri manually using either
or
If neither of those work, make sure your xcode is up to date and you have developer tools installed. Then I’d use homebrew to install the dependencies and update bundler to use those libraries by default.
@codenamev Thanks for the help. Here’s what I tried.
First of all I tried.
And it gave me the following error
Then I tried
and it seems that it went all OK and the GEM was installed.
And after that I ran the original command and it installed everything as it was supposed to.
Thanks for the help.
gem uninstall nokogiri xcode-select --install gem install nokogiri
upgrade to osx sierra broke xcode cli reinstall fixed it
@ahmadawais Thanks for sharing. This worked for me (just updated the version of the MacOSX sdk):
Thanks again 😄
Those coming here from google after upgrading MacOS to Mojave (10.14), just changing the above paths to 10.14 didn’t address the root issue. See this stack overflow answer.
Running this resolved it for me:
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /Thank you, @ahmadawais. It worked for me as well.
I’m on Sierra, 10.12.6
sudo gem install nokogiri – --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2 --use-system-libraries
It works for me! Thanks bro
For Mojave this one also works (remember to change the SDK version):
Fantastic! Thanks for providing feedback for anyone else running into this issue 😄