簡體   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