LoginSignup
1
0

More than 5 years have passed since last update.

macOS で charlock_holmes がインストールできないときの解決法

Last updated at Posted at 2018-09-06

macOS で Rails アプリケーションの環境構築をするために bundle install をしたら、charlock_holmes のインストールでエラーが出ました。

An error occurred while installing charlock_holmes (0.7.5), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.7.5' --source 'https://rubygems.org/'` succeeds before bundling.

そんなときは以下のコマンドを実行します。

$ brew install icu4c cmake
# 'x.x.x' をインストールしたいバージョンに置き換える
$ gem install charlock_holmes -v 'x.x.x' -- --with-cppflags=-DU_USING_ICU_NAMESPACE=1 --with-cxxflags=-std=c++11

x.x.x の箇所は、インストールしたい charlock_holmes のバージョンを指定します。たとえば上記のエラーでは 0.7.5 をインストールしようとしているので、その場合は x.x.x の箇所を 0.7.5 に置き換えます。

これで charlock_holmes がインストールできるようになりました。

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0