繁体   English   中英

自制软件,安装python

[英]Homebrew , python installing

我在尝试通过自制软件安装python时遇到错误。 brew说它无法链接python,这里是输出:

Linking /usr/local/Cellar/python/2.7.3... Warning: Could not link python. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/python/2.7.3/bin/smtpd2.py
/usr/local/bin/smtpd2.py may already exist.
/usr/local/bin may not be writable.

ls -la on / usr / bin和bin权限:

The drwxrwxrwx  26 root             admin  884 26 Oct 16:03 bin

并且smtpd2.py存在..我该如何解决? 删除smtpd2.py?

听起来像/ usr / local的权限问题。

### Makes you owner of /usr/local 
$ sudo chown -R `whoami` /usr/local

### Force uninstalls failed python
$ brew uninstall -f python

### Clear the brew cache
$ rm -rf `brew --cache`

### Recreate the brew cache
$ mkdir `brew --cache`

### Cleanup - cleans up old homebrew files
$ brew cleanup

### Prune - removes dead symlinks in homebrew
$ brew prune

### Doctor - runs homebrew checks for common error causing issues
$ brew doctor

########
### Google and follow steps to fix what `brew doctor` came back with
########

### Reinstall python
$ brew install python

你尝试过brew link --overwrite python吗? 这对我有用而无需卸载python - 有关更多详细信息,请参阅此问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM