2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

twitter→bundleでAn error occurred while installing unf_ext のエラー

2
Posted at

gemfileにgem 'twitter'と記述しbundle installすると以下のエラーが発生した。

current directory:
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext
make "DESTDIR=" clean

current directory:
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext
make "DESTDIR="
compiling unf.cc
make: g++: Command not found
make: *** [unf.o] Error 127

make failed, exit code 2

Gem files will remain installed in
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/unf_ext-0.0.7.6 for
inspection.
Results logged to
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/unf_ext-0.0.7.6/gem_make.out

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

一応gem install unf_ext -v '0.0.7.6'を実行したが同じエラーが表示された。

エラーの前半部分にあるmake: g++: Command not foundによりg++がないらしいことと、コンパイラーをインストールする必要があることが分かった。

$ sudo yum -y install gcc-c++

Complete後、再度bundleして無事成功。

Bundle complete!

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?