Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Can';不要安装brew_Ruby_Macos_Terminal_Homebrew_Macos Sierra - Fatal编程技术网

Ruby Can';不要安装brew

Ruby Can';不要安装brew,ruby,macos,terminal,homebrew,macos-sierra,Ruby,Macos,Terminal,Homebrew,Macos Sierra,我在终端上运行了这个: brew install libsndfile 导致此错误的原因: /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory /usr/local/bin/brew: line 21: /usr/local/L

我在终端上运行了这个:

brew install libsndfile
导致此错误的原因:

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
所以在航站楼:

这是输出的屏幕截图:


如何才能使命令
brew install libsndfile
正常工作?

本文中也提出了同样的问题。问题的原因是您安装了一个非常旧的自制版本,该版本仍然依赖于Ruby 1.8,在macOS 10.10中已被Ruby 2.0取代

如果你检查这个问题,你会发现两个稍微不同的解决方案。为打开原始版本的人工作的是在终端中运行以下命令:

cd /usr/local/Homebrew
git fetch origin
git reset --hard origin/master

之后,您可以运行
brew upgrade
来更新已安装的软件包(可能需要一些时间)。

本文中也提出了同样的问题。问题的原因是您安装了一个非常旧的自制版本,该版本仍然依赖于Ruby 1.8,在macOS 10.10中已被Ruby 2.0取代

如果你检查这个问题,你会发现两个稍微不同的解决方案。为打开原始版本的人工作的是在终端中运行以下命令:

cd /usr/local/Homebrew
git fetch origin
git reset --hard origin/master
之后,您可以运行
brew upgrade
更新已安装的软件包(可能需要一些时间)