今回初めて質問させていただきます。
お忙しいところ恐縮ですが、何卒ご助力をいただきたく思います。
よろしくお願いいたします。
前提・実現したいこと
実現したいこと:『railsのbundle instal
を通したい』
現在、自分で作ったrailsアプリケーションをawsを使ってデプロイしようとしています。アプリではファイルのアップロード機能を持たせておりますので、それに伴いaws s3を活用する必要が出てきました。そこで、Gemfileにgem 'fog'
を追加してbundle install
を行ったところ、以下に示すエラーを吐かれてしまいました。
開発環境
rails: 5.2.0
ruby: 2.4.2
os: centos6.5
*windowsにvagrantを入れて開発しています。
発生している問題・エラーメッセージ
発生しているエラーは以下の通りです。
gitbash
1Fetching gem metadata from https://rubygems.org/........ 2Fetching gem metadata from https://rubygems.org/. 3(文字数の関係で中略) 4Using fog-core 1.45.0 5Using multi_json 1.13.1 6Using fog-json 1.2.0 7Using ipaddress 0.8.3 8Using xml-simple 1.1.5 9Using fog-aliyun 0.3.2 10Using fog-xml 0.1.3 11Using fog-atmos 0.1.0 12Using fog-aws 2.0.1 13Using fog-brightbox 0.16.1 14Using fog-cloudatcost 0.1.2 15Using fog-digitalocean 0.4.0 16Using fog-dnsimple 1.0.0 17Using fog-dynect 0.0.3 18Using fog-ecloud 0.3.0 19Using fog-google 0.1.0 20Using fog-internet-archive 0.0.1 21Using fog-joyent 0.0.1 22Using fog-local 0.6.0 23Using fog-openstack 0.3.6 24Using json 2.1.0 25Fetching ovirt-engine-sdk 4.2.5 26Installing ovirt-engine-sdk 4.2.5 with native extensions 27Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 28 29 current directory: /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.5/ext/ovirtsdk4c 30/home/vagrant/.rbenv/versions/2.4.2/bin/ruby -r ./siteconf20181017-12122-phd71i.rb extconf.rb 31checking for xml2-config... yes 32checking for curl-config... no 33*** extconf.rb failed *** 34Could not create Makefile due to some reason, probably lack of necessary 35libraries and/or headers. Check the mkmf.log file for more details. You may 36need configuration options. 37 38Provided configuration options: 39 --with-opt-dir 40 --without-opt-dir 41 --with-opt-include 42 --without-opt-include=${opt-dir}/include 43 --with-opt-lib 44 --without-opt-lib=${opt-dir}/lib 45 --with-make-prog 46 --without-make-prog 47 --srcdir=. 48 --curdir 49 --ruby=/home/vagrant/.rbenv/versions/2.4.2/bin/$(RUBY_BASE_NAME) 50 --with-libcurl-config 51 --without-libcurl-config 52 --with-pkg-config 53 --without-pkg-config 54extconf.rb:40:in `<main>': The "libcurl" package isn't available. (RuntimeError) 55 56To see why this extension failed to compile, please check the mkmf.log which can be found here: 57 58 /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/ovirt-engine-sdk-4.2.5/mkmf.log 59 60extconf failed, exit code 1 61 62Gem files will remain installed in /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.5 for inspection. 63Results logged to /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/ovirt-engine-sdk-4.2.5/gem_make.out 64 65An error occurred while installing ovirt-engine-sdk (4.2.5), and Bundler cannot continue. 66Make sure that `gem install ovirt-engine-sdk -v '4.2.5'` succeeds before bundling. 67 68In Gemfile: 69 fog was resolved to 2.0.0, which depends on 70 fog-ovirt was resolved to 1.1.2, which depends on 71 ovirt-engine-sdk 72
試したこと
・gem install ovirt-engine-sdk -v '4.2.5'
の実行
エラーメッセージの終盤に出ていたコマンドを直接実行してみました。
実行結果は以下の通りです。
gitbash
1Building native extensions. This could take a while... 2ERROR: Error installing ovirt-engine-sdk: 3 ERROR: Failed to build gem native extension. 4 5 current directory: /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.5/ext/ovirtsdk4c 6/home/vagrant/.rbenv/versions/2.4.2/bin/ruby -r ./siteconf20181017-12230-1yfvobi.rb extconf.rb 7checking for xml2-config... yes 8checking for curl-config... no 9*** extconf.rb failed *** 10Could not create Makefile due to some reason, probably lack of necessary 11libraries and/or headers. Check the mkmf.log file for more details. You may 12need configuration options. 13 14Provided configuration options: 15 --with-opt-dir 16 --without-opt-dir 17 --with-opt-include 18 --without-opt-include=${opt-dir}/include 19 --with-opt-lib 20 --without-opt-lib=${opt-dir}/lib 21 --with-make-prog 22 --without-make-prog 23 --srcdir=. 24 --curdir 25 --ruby=/home/vagrant/.rbenv/versions/2.4.2/bin/$(RUBY_BASE_NAME) 26 --with-libcurl-config 27 --without-libcurl-config 28 --with-pkg-config 29 --without-pkg-config 30extconf.rb:40:in `<main>': The "libcurl" package isn't available. (RuntimeError) 31 32To see why this extension failed to compile, please check the mkmf.log which can be found here: 33 34 /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/ovirt-engine-sdk-4.2.5/mkmf.log 35 36extconf failed, exit code 1 37 38Gem files will remain installed in /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.5 for inspection. 39Results logged to /home/vagrant/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/ovirt-engine-sdk-4.2.5/gem_make.out 40
・sudo yum install libcurl-devel
の実行
gem install ovirt-engine-sdk -v '4.2.5'
を実行した際のエラーメッセージの終盤にThe "libcurl" package isn't available. (RuntimeError)
と出ていたことに気がつき、調べてみたところ、「libcurl
に関するパッケージが足りないことが原因である」という趣旨の指摘が散見されました。こちらのコマンドを実行する前にsudo yum install libcurl
なども試してみたのですが、Nothing to do
で終わっていたので、正常に動作したものと判断しました。
しかしながら、sudo yum install libcurl-devel
に関してだけは以下のエラーが発生しました。
gitbash
1Loaded plugins: fastestmirror, versionlock 2Setting up Install Process 3Loading mirror speeds from cached hostfile 4 * base: mirror.fairway.ne.jp 5 * epel: mirror01.idc.hinet.net 6 * extras: mirror.fairway.ne.jp 7 * ius: mirrors.kernel.org 8 * updates: mirror.fairway.ne.jp 9Resolving Dependencies 10--> Running transaction check 11---> Package libcurl-devel.x86_64 0:7.19.7-53.el6_9 will be installed 12--> Processing Dependency: libcurl = 7.19.7-53.el6_9 for package: libcurl-devel-7.19.7-53.el6_9.x86_64 13--> Processing Dependency: libidn-devel for package: libcurl-devel-7.19.7-53.el6_9.x86_64 14--> Running transaction check 15(文字数の関係で中略) 16---> Package db4-utils.x86_64 0:4.7.25-20.el6_7 will be updated 17---> Package db4-utils.x86_64 0:4.7.25-22.el6 will be an update 18---> Package readline.i686 0:6.0-4.el6 will be installed 19--> Processing Dependency: libtinfo.so.5 for package: readline-6.0-4.el6.i686 20--> Running transaction check 21---> Package ncurses-libs.i686 0:5.7-4.20090207.el6 will be installed 22--> Finished Dependency Resolution 23Error: Multilib version problems found. This often means that the root 24 cause is something else and multilib version checking is just 25 pointing out that there is a problem. Eg.: 26 27 1. You have an upgrade for libssh2 which is missing some 28 dependency that another package requires. Yum is trying to 29 solve this by installing an older version of libssh2 of the 30 different architecture. If you exclude the bad architecture 31 yum will tell you what the root cause is (which package 32 requires what). You can try redoing the upgrade with 33 --exclude libssh2.otherarch ... this should give you an error 34 message showing the root cause of the problem. 35 36 2. You have multiple architectures of libssh2 installed, but 37 yum can only see an upgrade for one of those arcitectures. 38 If you don't want/need both architectures anymore then you 39 can remove the one with the missing update and everything 40 will work. 41 42 3. You have duplicate versions of libssh2 installed already. 43 You can use "yum check" to get yum show these errors. 44 45 ...you can also use --setopt=protected_multilib=false to remove 46 this checking, however this is almost never the correct thing to 47 do as something else is very likely to go wrong (often causing 48 much more problems). 49 50 Protected multilib versions: libssh2-1.4.2-2.el6_7.1.i686 != libssh2-1.8.0-5.0.cf.rhel6.x86_64 51Error: Protected multilib versions: libcurl-7.19.7-53.el6_9.i686 != libcurl-7.57.0-1.0.cf.rhel6.x86_64 52
依存関係による問題が云々というところまでは把握できたのですが、解決するための文献を見つけることができませんでした。
何卒お力添えをいただきますよう、お願い申し上げます。

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/17 09:26
2018/10/17 09:44 編集
2018/10/17 09:55
2018/10/18 03:18
2018/10/21 08:57