自制软件,python安装 [英] Homebrew , python installing

查看:92
本文介绍了自制软件,python安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试通过自制软件安装python时出现错误. brew说无法链接python,输出如下:

i got an error while trying to install python throught homebrew. brew says what it failed to link python , here is output:

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.

/usr/bin上的ls -la和bin权限:

ls -la on /usr/bin and bin rights :

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

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

And smtpd2.py is exists.. How can i fix it? Delete smtpd2.py ?

推荐答案

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

Sounds like a permissions issue with /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

这篇关于自制软件,python安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆