実現したいこと
- nokogiriをインストールしたい
再現
rails s
をする前にbundle install
をすると
lang
1An error occurred while installing nokogiri (1.8.2), and Bundler cannot continue. 2Make sure that `gem install nokogiri -v '1.8.2' --source 'https://rubygems.org/'` succeeds before 3bundling
と言われたのでgem install nokogiri -v '1.8.2' --source 'https://rubygems.org/'
を実行
すると
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.8.2/ext/nokogiri /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180613-40944-1q1s8p6.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.3.0 checking for iconv.h... yes checking for gzdopen() in -lz... yes checking for iconv... no Using pkg-config gem version 1.3.1 checking for libiconv... no ----- libiconv is missing. Please locate mkmf.log to investigate how it is failing. ----- *** 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.3/usr/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 To see why this extension failed to compile, please check the mkmf.log which can be found here: /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/nokogiri-1.8.2/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.8.2 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/nokogiri-1.8.2/gem_make.out
と出た。
ここから進まず困っています。
- bundle install で nokogiri をインストールしろと言われる解決方法
- nokogiri を嫌いにならないで 〜インストール時のエラーを乗り越えろ〜
- [Mac OS X Mavericksでrailsのbundle install時にnokogiriインストールエラー
](https://qiita.com/kytiken/items/45da8f61775ec1cff3f8)
このあたりの対処方法を試したのですが解決できないです。
環境
macOS 10.13.5(17F77)
質問の仕方もよく分からないのですが、これで伝わりますでしょうか。
どなたか手助けしていただけると嬉しいです。
###追加
https://qiita.com/kytiken/items/45da8f61775ec1cff3f8 の`brew tap homebrew/dupes`
をすると
Error: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
と出ます。
調べてみたのですがよく分からない状態です。
回答2件
あなたの回答
tips
プレビュー