Why “ruby-install ruby” fails with: “E: Couldn't find package build-essential”?

寵の児 提交于 2019-12-13 05:49:39

问题


I've installed ruby-install like this:

brew install ruby-install

But, when I try to install ruby it fails:

$ ruby-install ruby
>>> Installing ruby 2.1.1 into /Users/mishamoroshko/.rubies/ruby-2.1.1 ...
>>> Installing dependencies for ruby 2.1.1 ...
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package build-essential
!!! Installing dependencies failed!

I'm on Mac OSX 10.9.2.

Any ideas?


回答1:


Apparently, apt-get was the first in ruby-install's package manager detection order. It was broken on my system, and this is why the error.

After I removed apt-get from my system, ruby-install picked up Homebrew and the error disappeared.



来源:https://stackoverflow.com/questions/22403376/why-ruby-install-ruby-fails-with-e-couldnt-find-package-build-essential

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!