mac下面brew的权限问题
想写一个爬虫去爬一些图片,发现python3的request封装的比较。遂决定要装一个python3。
mac下的神器就是brew,分分种完成各种软件包的安装。执行完之后报错了。
brew install python3
结果如下,从最后几行的输出判断是由于权限不足导致的。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
==> Downloading https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz ######################################################################## 100.0% ==> ./configure --prefix=/usr/local/Cellar/python3/3.4.3 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.4.3/share --datadir=/usr/local/Cellar/python ==> make ==> make install PYTHONAPPSDIR=/usr/local/Cellar/python3/3.4.3 ==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python3/3.4.3/share/python3 ==> Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-12.2.tar.gz ######################################################################## 100.0% ==> Downloading https://pypi.python.org/packages/source/p/pip/pip-6.0.8.tar.gz ######################################################################## 100.0% ==> Caveats Pip has been installed. To update it pip3 install --upgrade pip You can install Python packages with pip3 install <package> They will install into the site-package directory /usr/local/lib/python3.4/site-packages See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md .app bundles were installed. Run `brew linkapps python3` to symlink these to /Applications. Error: An unexpected error occurred during the `brew link` step The formula built, but is not symlinked into /usr/local Permission denied - /usr/local/Frameworks Error: Permission denied - /usr/local/Frameworks |
brew遇到问题排错步骤是:
1 2 3 4 5 |
sudo chown -R $(whoami):admin /usr/local sudo chown -R $(whoami) /Library/Caches/Homebrew brew doctor brew prune brew update |
brew linkapps python3
分类: 技术