4
4

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.

therubyracerのbundle installでこける

Posted at

RailsとAWS初心者である自分がAWSでRailsで開発始めようとした時ににtherubyracerのbundle installがこけたのでメモ。

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.0 extconf.rb
checking for main() in -lpthread... yes
creating Makefile

make "DESTDIR="
g++ -I. -I/home/ec2-user/.gem/ruby/2.0/gems/libv8-3.16.14.7-x86_64-linux/vendor/v8/include -I/usr/include/ruby/2.0 -I/usr/include/ruby/2.0/ruby/backward -I/usr/include/ruby/2.0 -I.   -Wall -g -rdynamic -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -m64 -o accessor.o -c accessor.cc
make: g++: コマンドが見つかりませんでした
make: *** [accessor.o] エラー 127


Gem files will remain installed in /home/ec2-user/.gem/ruby/2.0/gems/therubyracer-0.12.1 for inspection.
Results logged to /home/ec2-user/.gem/ruby/2.0/gems/therubyracer-0.12.1/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.12.1), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling.

gcc-c++をインストールしてなかった。

[ec2-user@xxx test]$ sudo yum install -y ruby20-devel gcc-c++
読み込んだプラグイン:priorities, update-motd, upgrade-helper
パッケージ ruby20-devel-2.0.0.643-1.21.amzn1.x86_64 はインストール済みか最新バージョンです
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ gcc-c++.noarch 0:4.8.2-3.19.amzn1 を インストール
--> 依存性の処理をしています: gcc48-c++ = 4.8.2 のパッケージ: gcc-c++-4.8.2-3.19.amzn1.noarch
--> 依存性の処理をしています: libstdc++48-devel = 4.8.2 のパッケージ: gcc-c++-4.8.2-3.19.amzn1.noarch
--> トランザクションの確認を実行しています。
---> パッケージ gcc48-c++.x86_64 0:4.8.2-16.2.99.amzn1 を インストール
---> パッケージ libstdc++48-devel.x86_64 0:4.8.2-16.2.99.amzn1 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

====================================================================================================================================================================================
 Package                                        アーキテクチャー                    バージョン                                         リポジトリー                            容量
====================================================================================================================================================================================
インストール中:
 gcc-c++                                        noarch                              4.8.2-3.19.amzn1                                   amzn-main                              3.6 k
依存性関連でのインストールをします:
 gcc48-c++                                      x86_64                              4.8.2-16.2.99.amzn1                                amzn-main                              7.8 M
 libstdc++48-devel                              x86_64                              4.8.2-16.2.99.amzn1                                amzn-main                              1.7 M

トランザクションの要約
====================================================================================================================================================================================
インストール  1 パッケージ (+2 個の依存関係のパッケージ)

総ダウンロード容量: 9.5 M
インストール容量: 24 M
Downloading packages:
(1/3): gcc-c++-4.8.2-3.19.amzn1.noarch.rpm                                                                                                                   | 3.6 kB     00:00
(2/3): gcc48-c++-4.8.2-16.2.99.amzn1.x86_64.rpm                                                                                                              | 7.8 MB     00:00
(3/3): libstdc++48-devel-4.8.2-16.2.99.amzn1.x86_64.rpm                                                                                                      | 1.7 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
合計                                                                                                                                                 39 MB/s | 9.5 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : libstdc++48-devel-4.8.2-16.2.99.amzn1.x86_64                                                                                                        1/3
  インストール中          : gcc48-c++-4.8.2-16.2.99.amzn1.x86_64                                                                                                                2/3
  インストール中          : gcc-c++-4.8.2-3.19.amzn1.noarch                                                                                                                     3/3
  検証中                  : libstdc++48-devel-4.8.2-16.2.99.amzn1.x86_64                                                                                                        1/3
  検証中                  : gcc-c++-4.8.2-3.19.amzn1.noarch                                                                                                                     2/3
  検証中                  : gcc48-c++-4.8.2-16.2.99.amzn1.x86_64                                                                                                                3/3

インストール:
  gcc-c++.noarch 0:4.8.2-3.19.amzn1

依存性関連をインストールしました:
  gcc48-c++.x86_64 0:4.8.2-16.2.99.amzn1                                               libstdc++48-devel.x86_64 0:4.8.2-16.2.99.amzn1

完了しました!
[ec2-user@xxx test]$ gem install therubyracer
Building native extensions.  This could take a while...
Successfully installed therubyracer-0.12.2
Parsing documentation for therubyracer-0.12.2
Installing ri documentation for therubyracer-0.12.2
Done installing documentation for therubyracer after 0 seconds
1 gem installed
[ec2-user@xxx test]$ bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/..
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.1
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.0
Using rack 1.6.0
Using rack-test 0.6.3
Using actionpack 4.2.0
Using globalid 0.3.5
Using activejob 4.2.0
Using mime-types 2.5
Using mail 2.6.3
Using actionmailer 4.2.0
Using activemodel 4.2.0
Using arel 6.0.0
Using activerecord 4.2.0
Using multi_json 1.7.8
Using jmespath 1.0.2
Using aws-sdk-core 2.0.41
Using aws-sdk-resources 2.0.41
Using aws-sdk 2.0.41
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using columnize 0.9.0
Using byebug 4.0.5
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.0
Using coffee-rails 4.1.0
Using jbuilder 2.2.13
Using jquery-rails 4.0.3
Using libv8 3.16.14.7
Using bundler 1.9.4
Using sprockets 3.0.3
Using sprockets-rails 2.2.4
Using rails 4.2.0
Using rdoc 4.2.0
Using ref 1.0.5
Using sass 3.4.13
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using spring 1.3.5
Using sqlite3 1.3.10
Installing therubyracer 0.12.1
Using uglifier 2.7.1
Using web-console 2.1.2
Bundle complete! 15 Gemfile dependencies, 60 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
[ec2-user@xxx test]$
4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?