brew install python3

brew install python3
此时,安装完成后会出现一点问题:

liyang@liyang  ~  brew install python3
Updating Homebrew…
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/php).
==> Updated Formulae
homebrew/php/adminer homebrew/php/drupalconsole
==> Installing dependencies for python3: gdbm
==> Installing python3 dependency: gdbm
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/gd

################################################################## 100.0%

==> Pouring gdbm-1.14.1_1.high_sierra.bottle.tar.gz
�� /usr/local/Cellar/gdbm/1.14.1_1: 20 files, 555.7KB
==> Installing python3
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/py

################################################################## 100.0%

==> Pouring python3-3.6.4_2.high_sierra.bottle.tar.gz
Error: An unexpected error occurred during the brew link step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
✘ liyang@liyang  ~  ls /usr/local/Frameworks
ls: /usr/local/Frameworks: No such file or directory
此时会发现两个错误,第一个是权限问题,第二个是/usr/local/Frameworks目录不存在。
首先,我们先解决目录不存在的问题

sudo mkdir /usr/local/Frameworks
创建目录以后,我们开始解决权限问题,通过Google,发现大多数处理方法都是

sudo chown $(whoami):admin /usr/local/
虽然能解决问题,但并不是一个好的idea~,这里非常不建议使用,那么解决方案入下:

sudo chown -R (whoami) ( w h o a m i ) (brew –prefix)/*
此时,上面两个问题就已经安装完成,只需要最后一步link一下即可。

brew link python3
Linking /usr/local/Cellar/python3/3.6.4_2… 1 symlinks created
此时python3就已经安装完成(/usr/local/Cellar/),以后可以使用brew来更新了~

参考链接

https://github.com/Homebrew/homebrew-core/issues/19286
https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值