繁体   English   中英

使用自制软件取消链接python的问题

[英]Problems with unlinking python using homebrew

我想从Mac上卸载python,因为我遇到了一些麻烦并想重新安装它。

因此,我尝试使用brew unlink python 但是,当我尝试该操作时,控制台将引发以下错误:

取消链接/usr/local/Cellar/python/3.7.4 ...错误:没有这样的文件或目录@ realpath_rec-/ usr / local / opt / python

现在由于上述问题,我无法使用python,但是我也无法重新安装它。 我能做什么?

符号链接似乎丢失了。 转载:

% rm /usr/local/opt/python
rm: remove symbolic link '/usr/local/opt/python'? y

% brew unlink python
Unlinking /usr/local/Cellar/python/3.7.4... Error: No such file or directory @ realpath_rec - /usr/local/opt/python

% brew reinstall  --force python
==> Reinstalling python
Error: python 3.7.4 is already installed
To install 3.7.4, first run `brew unlink python`.

重新建立连结...

% ln -s /usr/local/Cellar/python/3.7.4/bin/python3 /usr/local/opt/python
'/usr/local/opt/python' -> '/usr/local/Cellar/python/3.7.4/bin/python3'

并且您应该能够取消链接或卸载:

% brew unlink python
Unlinking /usr/local/Cellar/python/3.7.4... 22 symlinks removed

% brew uninstall python
Uninstalling /usr/local/Cellar/python/3.7.4... (3,865 files, 60MB)

暂无
暂无

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

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