OSX Homebrew错误:未初始化的常量MACOS [英] OSX Homebrew error: uninitialized constant MACOS
问题描述
我进行了一些搜索,似乎找不到其他人遇到此问题的任何记录.
I've searched around a bit and can't seem to find any record of anyone else with this problem.
每当我尝试运行
$ brew update
我被奖励
/usr/local/bin/brew:34: uninitialized constant MACOS (NameError)
这不是我的机器,我通常在Linux系统上开发,所以这对我来说有点奇怪.
This isn't my machine and I normally develop on Linux systems so this is all a bit odd to me.
任何帮助将不胜感激!请告诉我是否还有其他信息应提供.同样,我不习惯自制软件或OSX.
Any help would be greatly appreciated! Please tell me if there is any additional info I should provide. Again, I'm not used to homebrew or OSX.
编辑 应JameA的要求
EDIT at the request of JameA
xiao:~ patrick$ brew doctor
/usr/local/bin/brew:34: uninitialized constant MACOS (NameError)
xiao:~ patrick$ brew --config
/usr/local/bin/brew:34: uninitialized constant MACOS (NameError)
...不确定我是否整个都喜欢在这里,将此Macbook用于项目,效果更好" ...
...Not sure I like this whole "here, use this macbook for the project, it works better" thing...
推荐答案
MACOS
常量在globals.rb
中设置.看来您可能对Homebrew的安装感到厌烦.
The MACOS
constant is set in globals.rb
. It seems like you may have a borked installation of Homebrew.
检查brew doctor
的输出以获取任何建议.
Check the output of brew doctor
for any suggestions.
如果这样做没有帮助,请更新brew --config
的结果.
If that doesn't help please update with the results of brew --config
.
如果其他所有方法均失败,则可能需要尝试重新安装Homebrew.
If all else fails you may want to try re-installing Homebrew.
更新:
由于这是以前的用户机器,请确保您的用户是/usr/local 以及其中所有内容的所有者.用sudo chown -R $USER /usr/local
修复它.
Since this was a previous user's machine make sure your user is the owner of /usr/local and everything within. Fix it with sudo chown -R $USER /usr/local
.
这篇关于OSX Homebrew错误:未初始化的常量MACOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!