[英]Error installing eventmachine gem
當我運行foreman start
,出現以下錯誤:
pallav@pallav-System-Product-Name:~/Workspace/Aadvisor$ foreman start
10:04:32 web.1 | started with pid 11022 10:04:32 web.1 |
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in
`block in materialize': Could not find eventmachine-0.12.10 in any of
the sources (Bundler::GemNotFound) 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in
`map!' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in
`materialize' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in
`specs' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in
`specs_for' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in
`requested_specs' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in
`requested_specs' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in
`setup' 10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
10:04:32 web.1 | from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in
`<top (required)>' 10:04:32 web.1 | from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
10:04:32 web.1 | from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
10:04:32 web.1 | exited with code 1 10:04:32 system | sending SIGTERM
to all processes SIGTERM received
pallav@pallav-System-Product-Name:~/Workspace/Aadvisor$
我也做了
sudo bundle install
再次報錯:“安裝 eventmachine (0.12.10) 時出錯,Bundler 無法繼續。請確保在打包前 gem install eventmachine -v '0.12.10' 成功。”
現在當我做
sudo gem install eventmachine -v '0.12.10'
我再次收到錯誤消息:
"ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension."
請告訴我我缺少什么。
為了在 Ubuntu 14.04 上安裝eventmachine 1.0.3 ,您首先需要運行:
sudo apt-get install build-essential
然后bundle install
或gem install eventmachine
應該夠了。
注意:如果你有 rbenv,記得在bundle install
之后運行rbenv rehash
。
嘗試安裝 openssl 和 libstdc++。
如果您使用 rvm 並在單用戶模式下安裝了 ruby,則應省略 sudo。
你能粘貼完整的錯誤日志嗎? 用那個回答你的問題會更容易。
更新請在另一個stackoverflow線程中參考這個答案https://stackoverflow.com/a/17386686/846970 ,讓我知道它是否有效。
您需要運行bundle install
您的機器上沒有安裝 Gemfile 中所需的 gem 之一。
嘗試更新您的系統 RubyGems。
我希望這對你有用。
對於無法使用上述方法解決的其他人:
sudo -u gitlab -H bundle config build.eventmachine --with-cflags=\"-O2 -pipe -march=native -w\"
sudo -u gitlab -H bundle config build.thin --with-cflags=\"-O2 -pipe -march=native -w\"
正如用戶所描述恩里科這里。
嘗試gem install eventmachine -- --with-openssl-dir=/usr/local/opt/openssl@1.1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.