Установка Homebrew, установка python
У меня возникла ошибка при попытке установить python throught homebrew. 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?
Ответы
Ответ 1
Звучит как проблема с правами доступа /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
Ответ 2
Вы попробовали brew link --overwrite python
? Это работало для меня без необходимости удаления python - см. этот вопрос для более подробной информации.