質問: chown:/ usr / local:操作は許可されていません どうすれば修正できますか?tue oct 31 21:52:56 mona@dhcp-wifi-8021x-155-41-82-88:~$ brew update && brew upgrade && brew cleanup error: /usr/local is not writable. you should change the ownership and permissions of /usr/local back to your user account: sudo chown -r $(whoami) /usr/local wed nov 01 20:41:30 mona@dhcp-wifi-8021x-155-41-82-88:~$ sudo chown -r $(whoami) /usr/local password: chown: /usr/local: operation not permitted システム情報:wed nov 01 20:42:36 mona@dhcp-wifi-8021x-155-41-82-88:~$ uname -a darwin dhcp-wifi-8021x-155-41-53-197.bu.edu 17.0.0 darwin kernel version 17.0.0: thu aug 24 21:48:19 pdt 2017; root:xnu-4570.1.46~2/release_x86_64 x86_64 そしてwed nov 01 20:44:03 mona@dhcp-wifi-8021x-155-41-82-88:~$ brew config homebrew_version: >1.2.0 (shallow or no git repository) origin: https://github.com/homebrew/brew.git head: 38209aadbfe4fd0c6772467c4bc5c63325d53f6c last commit: 1 year, 3 months ago core tap origin: https://github.com/homebrew/homebrew-core core tap head: 839ca7b9b4ce034b5abdb66cee0ef75bbb675ddf core tap last commit: 1 year, 3 months ago homebrew_prefix: /usr/local homebrew_repository: /usr/local homebrew_cellar: /usr/local/cellar homebrew_bottle_domain: https://homebrew.bintray.com cpu: quad-core 64-bit haswell homebrew ruby: 2.3.3 => /system/library/frameworks/ruby.framework/versions/2.3/usr/bin/ruby gcc-4.2: build 5666 clang: 8.0 build 800 git: 2.9.2 => /usr/local/bin/git perl: /usr/bin/perl python: /users/mona/anaconda/bin/python => /users/mona/anaconda/bin/python3.6 ruby: /users/mona/.rvm/rubies/ruby-2.0.0-p353/bin/ruby java: 1.8.0_71, 1.7.0_60 macos: 10.13-x86_64 xcode: 8.0 clt: 9.0.1.0.1.1506734476 x11: 2.7.11 => /opt/x11 wed nov 01 20:44:25 mona@dhcp-wifi-8021x-155-41-82-88:~$ brew doctor please note that these warnings are just used to help the homebrew maintainers with debugging if you file an issue. if everything you use homebrew for is working fine: please don't worry and just ignore them. thanks! warning: /usr/local is not writable. you should change the ownership and permissions of /usr/local back to your user account. sudo chown -r $(whoami) /usr/local warning: anaconda is known to frequently break homebrew builds, including vim and macvim, due to bundling many duplicates of system and homebrew-available tools. if you encounter a build failure please temporarily remove anaconda from your $path and attempt the build again prior to reporting the failure to us. thanks! warning: python is symlinked to python3 this will confuse build scripts and in general lead to subtle breakage. warning: "config" scripts exist outside your system or homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking.
回答: 私は醸造を更新しようとしたときにこれを取得していたので、私にとってはより簡単な方法でうまくいきました:sudo chown -r $(whoami)$(brew --prefix)/ *