我想我已经安装了自制软件。每当我输入任何brew命令时,我都会得到一个未初始化的常量操作系统错误。
MacBook-Pro-2:~ aramu$ brew update
/usr/local/Library/brew.rb:37:in `<main>': uninitialized constant OS (NameError)
MacBook-Pro-2:~ aramu$ brew doctor
/usr/local/Library/brew.rb:37:in `<main>': uninitialized constant OS (NameError)
MacBook-Pro-2:~ aramu$ brew --config
/usr/local/Library/brew.rb:37:in `<main>': uninitialized constant OS (NameError)
我查看了一个类似问题(OSX Homebrew error: uninitialized constant MACOS)的解决方案,该问题表明我的用户是/ usr / local /的所有者以及其中的所有内容。它仍然不适合我。
注意:该机器之前已经使用过,在收到它时,我为我创建了一个具有管理员权限的新用户。
以下是如何为该文件夹设置权限:
MacBook-Pro-2:~ aramu$ ls -lrth /usr/local/
total 80
drwxrwxr-x 5 aramu admin 170B Oct 22 2013 libexec
drwxrwxr-x 4 aramu admin 136B Jan 28 14:20 var
drwxrwxr-x 10 aramu admin 340B Jan 28 14:20 share
drwxr-xr-x 5 aramu admin 170B Jan 28 14:20 opt
drwxr-xr-x 5 aramu admin 170B Jan 28 14:20 man
drwxrwxr-x 24 aramu admin 816B Jan 28 14:20 lib
drwxrwxr-x 29 aramu admin 986B Jan 28 14:20 include
drwxrwxr-x 4 aramu admin 136B Jan 28 14:20 etc
-rw-r--r-- 1 aramu admin 23K Jun 4 16:14 SUPPORTERS.md
-rw-r--r-- 1 aramu admin 1.8K Jun 4 16:14 README.md
-rw-r--r-- 1 aramu admin 1.2K Jun 4 16:14 LICENSE.txt
-rw-r--r-- 1 aramu admin 687B Jun 4 16:14 CONTRIBUTING.md
-rw-r--r-- 1 aramu admin 3.1K Jun 4 16:14 CODEOFCONDUCT.md
drwxrwxr-x 31 aramu admin 1.0K Jul 10 14:16 bin
drwxrwxr-x 9 aramu admin 306B Jul 10 14:22 Library
MacBook-Pro-2:~ aramu$