Ketika saya menjalankan perintah di situs web buatan sendiri,
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Saya mendapat:
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
==> The following directories will be made group writable:
/usr/local/.
==> The following directories will have their owner set to 17oei:
/usr/local/.
==> The following directories will have their group set to admin:
/usr/local/.
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/.
chmod: Unable to change file mode on /usr/local/.: Operation not permitted
Failed during: /usr/bin/sudo /bin/chmod g+rwx /usr/local/.
Namun, saya tidak melihat alasan untuk ini, karena saya adalah admin di komputer saya.
macos
command-line
homebrew
Reed Oei
sumber
sumber
ls -la
di / usr dan memberi tahu kami atribut apa yang dimiliki folder / usr / local?drwxr-xr-x 5 root wheel 170 Aug 20 2015
sudo /bin/chmod g+rwx /usr/local
langsung di Terminal?chmod: Unable to change file mode on /usr/local: Operation not permitted
Jawaban:
Dari
ls
hasil Anda :drwxr-xr-x 5 root wheel uchg 170 Aug 20 2015 local
Itu
uchg
bendera berarti file atau direktori tidak dapat diubah. Anda dapat menghapusnya dengan perintah ini:sudo chflags -R nouchg /usr/local
Untuk informasi lebih lanjut tentang flag file, lihat halaman manual untuk
chflags
: http://ss64.com/osx/chflags.htmlsumber