【发布时间】:2015-04-15 00:37:21
【问题描述】:
我想通过 Homebrew 安装 python 3。这是我得到的错误:
Error: You must `brew link xz gdbm' before python3 can be installed
现在,当我执行“brew link xz gdbm”时,我得到了这个:
Linking /usr/local/Cellar/gdbm/1.11... Error: Could not symlink include/gdbm.h/usr/local/include is not writable.
我尝试了以下选项来解决此问题:
sudo chown -R $USER /usr/local/bin/include
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
在此之后,我尝试再次安装 python3,但我得到了同样的错误。请帮忙。
【问题讨论】:
-
你为什么不直接安装 Python 3……来自 Python.org?
-
brew doctor可能会在您将来遇到此类问题时提出解决方案。下面伊恩的回答是正确的。
标签: python python-3.x homebrew