brew安装python,但是:"python-2.7.6已安装,它只是没有链接"

 百合想你511 发布于 2023-02-09 09:56

免责声明:noob

OSX 10.8.5

当我在bash中安装python时,我得到了这个警告和错误:

Warning: Could not link python. Unlinking...
Error: The 'brew link' step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using 'brew link python

所以我继续打字

brew link python

得到了

Linking /usr/local/Cellar/python/2.7.6... Warning: Could not link python. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/python/2.7.6/bin/smtpd2.py 
Target /usr/local/bin/smtpd2.py already exists. You may need to delete it. 
To force the link and overwrite all other conflicting files, do:

brew link --overwrite formula_name

我应该这样做吗?在这种情况下链接python是什么意思,更不用说强制链接它了,什么是formula_name?

这个问题很相似,但也有所不同,所以我不敢尝试最受欢迎的答案,因为它可能会让我深入挖掘我现在陷入困境的兔子洞.

1 个回答
  • 看起来您之前使用其他方法安装了Python.不要害怕.Homebrew经过精心设计,因此不会像Mac Ports等人那样搞乱你的系统.

    您可以随时brew link --overwrite --dry-run python查看将要覆盖的内容,而不会实际执行此操作.

    如果你这样做,它看起来只是覆盖或删除*.py脚本,那么你应该不那么害怕.

    2023-02-09 10:02 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有