我正在尝试使用brew by在我的mac上重新安装python3
brew install python3
。
但是当进行链接步骤时,它引发了一个错误:
The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-3.5
Target /usr/local/bin/2to3-3.5
already exists. You may want to remove it:
rm '/usr/local/bin/2to3-3.5'
To force the link and overwrite all conflicting files:
brew link --overwrite python3
To list all files that would be deleted:
brew link --overwrite --dry-run python3
但在使用rm '/usr/local/bin/2to3-3.5
和brew link --overwrite python3
后,
发生了其他错误:Error: Permission denied - /usr/local/Frameworks
。
我不知道为什么会这样,因为我无法在Frameworks
下看到/usr/local/
目录。
答案 0 :(得分:2)
我设法通过手动创建Frameworks目录来解决此问题:
sudo mkdir /usr/local/Frameworks
sudo chown `whoami` /usr/local/Frameworks
答案 1 :(得分:1)
在写作时,Homebrew要求将/ usr / local的内容添加到您的用户名中。这似乎不是一个很好的解决方案,但它确实有效,而且显然是推荐用途。请参阅:https://github.com/mxcl/homebrew/issues/9953#issuecomment-3800557
你可以这样做:
sudo chown -R `whoami` /usr/local
brew link python3