ruby 在 Mac 10.7 上运行“requirements_osx_brew_libs_install...”时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16473115/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error running 'requirements_osx_brew_libs_install...' on Mac 10.7
提问by user1883951
Trying to install brew on a last generation Macbook Pro and keep getting the following error:
尝试在上一代 Macbook Pro 上安装 brew 并不断收到以下错误:
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl sqlite',
please read /Users/allegrascrugham/.rvm/log/ruby-1.9.3-p392/1368142352_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl_sqlite.log
运行“requirements_osx_brew_libs_install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl sqlite”时出错,
请阅读/Users/allegrascrugham/.rvm/log/ruby-1.9.3-p392/1368142352_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl_sqlite。
I tried removing and reinstalling RVM & Brew with no luck.
我尝试删除并重新安装 RVM & Brew,但没有成功。
回答by Nik
I had the exact same error when running rvm requirements. That log file doesn't give any hints other than a package failed to install.
运行时我遇到了完全相同的错误rvm requirements。除了安装失败的软件包外,该日志文件没有给出任何提示。
This is what worked for me:
这对我有用:
go from the last package before it fails, in your case sqlite. Then install manually like so:
在您的情况下,从失败之前的最后一个包开始sqlite。然后像这样手动安装:
brew install sqlite
Then run rvm requirementsagain, it will probably fail at an earlier package. Repeat the steps above.
然后rvm requirements再次运行,它可能会在较早的包中失败。重复以上步骤。
回答by mfq
You have to install these dependences manually, try
您必须手动安装这些依赖项,请尝试
brew install automake
brew 安装 automake
if it gives you error of missing link of automake something like this
如果它给你缺少 automake 链接的错误,就像这样
You must `brew link autoconf' before automake can be installed
在安装 automake 之前,您必须“brew link autoconf”
then try these commands
然后尝试这些命令
brew link --overwrite --dry-run autoconf
brew link --overwrite autoconf
brew install automake
brew link --overwrite --dry-run autoconf
brew link --overwrite autoconf
brew 安装 automake
it will install automake and then you can try again to install ruby.
它将安装 automake,然后您可以再次尝试安装 ruby。
回答by Artem Kirillov
One simple solution: install Xcode Command Line Tools.
一个简单的解决方案:安装 Xcode 命令行工具。
xcode-select --install
Hope this helps.
希望这可以帮助。
回答by Rajive Jain
Had similar issues on a new OS X Mountain Lion install.
在新的 OS X Mountain Lion 安装上有类似的问题。
Followed tutorial http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/until step 6 when I got this error. Also checked log file which didn't indicate exact problem.
按照教程http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/直到第 6 步出现此错误。还检查了没有指出确切问题的日志文件。
Decided to verify if RVM had installed.
决定验证是否已安装 RVM。
type rvm | head -1
Didn't show rvm as being 'sourced'. So, opened new terminal to check. Sure enough, new terminal returned rvm is a function. So, closed older terminal session & re-copied install rvm script into new terminal.
没有将 rvm 显示为“来源”。因此,打开新终端进行检查。果然,新终端回来了rvm is a function。因此,关闭旧终端会话并将安装 rvm 脚本重新复制到新终端中。
\curl -L https://get.rvm.io| bash -s stable --rails --autolibs=enable
\curl -L https://get.rvm.io| bash -s stable --rails --autolibs=enable
After this, all went well. Did not do any manual installs.One slight detour I took was to brew install pkg-configafter reading the post Error installing any ruby version with RVM on OSXjust before running the above curl command again - this was likely unnecessary too.
在这之后,一切都很顺利。没有做任何手动安装。我采取的一个小弯路是brew install pkg-config在再次运行上述 curl 命令之前阅读了在 OSX 上使用 RVM 安装任何 ruby 版本时出错的帖子- 这也可能是不必要的。
Then,
然后,
rvm use 2.0.0 --default
You might get a message:
您可能会收到一条消息:
>A RVM version 1.20.11 (stable) is installed yet 1.20.10 (stable) is loaded.
Please do one of the following:
* 'rvm reload'
* open a new shell
* 'echo rvm_auto_reload_flag=1 >> ~/.rvmrc' # for auto reload with msg.
* 'echo rvm_auto_reload_flag=2 >> ~/.rvmrc' # for silent auto reload.
Type dvm reloador one of the other options. Verify with dvm -v, ruby -v
输入dvm reload或其他选项之一。验证dvm -v,ruby -v
回答by mmgg
The log file that this error tells you to check has this info:
此错误告诉您检查的日志文件包含以下信息:
There were package installation errors, make sure to read the log.
Try
brew tap --repairand make surebrew doctorlooks reasonable.Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
有包安装错误,请务必阅读日志。
尝试
brew tap --repair并确保brew doctor看起来合理。检查 Homebrew 要求 https://github.com/mxcl/homebrew/wiki/Installation
After running brew tap --repair, rvm was able to auto install the missing dependencies via homebrew and install my ruby without problems. no need to manually install each package or anything else.
运行 brew tap --repair 后,rvm 能够通过自制软件自动安装缺少的依赖项,并且可以毫无问题地安装我的 ruby。无需手动安装每个包或其他任何东西。
回答by rayrod2030
Looks like a package you are trying to pull might be unreachable. I am seeing the same error and the log file shows an error trying to download http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gzwhich I can confirm is currently unreachable via wget:
看起来您尝试提取的包可能无法访问。我看到同样的错误,日志文件显示尝试下载http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz的错误,我可以确认当前无法通过 wget 访问:
--2013-05-13 21:09:52-- (try: 2) http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gzConnecting to pyyaml.org|70.87.222.22|:80... connected. HTTP request sent, awaiting response... Read error (Operation timed out) in headers. Retrying.
--2013-05-13 21:09:52--(尝试:2) http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz连接到 pyyaml.org|70.87.222.22| :80... 已连接。HTTP 请求已发送,正在等待响应... 标头中的读取错误(操作超时)。重试。
Also confirming that pyyaml.org is unreachable for me.
还确认我无法访问 pyyaml.org。
回答by ArdentLearner
Ran into a similar issue with MacOS High Sierra and this thread was super helpful. Ended here after running brew install gcc49from herethen had to run brew upgrade automakeand brew upgrade coreutilsI already had this installed and my X-code was up todate.
MacOS High Sierra 遇到了类似的问题,这个帖子非常有帮助。brew install gcc49从这里运行后到这里结束然后必须运行brew upgrade automake,brew upgrade coreutils我已经安装了它并且我的 X 代码是最新的。
回答by Cristi
I run into the described problem on my MacBook 2,1 running Snow Leopard 10.6.8 after executing curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --rails. After trying again the installation was successful without making any additional changes.
执行后,我在运行 Snow Leopard 10.6.8 的 MacBook 2,1 上遇到了上述问题curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --rails。再次尝试后安装成功,无需进行任何其他更改。
Give brew&rvm a second chance :)
给brew&rvm第二次机会:)

