Kali-Linux

我無法安裝 pip 和其他必需品

  • October 4, 2021

當我嘗試通過此命令安裝時pipaptsudo apt install python-pip回复:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python-pip

pip3 也會發生這種情況。

┌──(aja㉿aja)-[~/Desktop/minecraft java] 
└─$ sudo apt install python3-pip 
[sudo] password for aja: 
Reading package lists... Done 
Building dependency tree... Done 
Reading state information... Done 
Package python3-pip is not available, but is referred to by another package. 
This may mean that the package is missing, has been obsoleted, or 
is only available from another source 

E: Package 'python3-pip' has no installation candidate

我正在使用 Kali Linux。

我該如何解決?

我無法安裝 pip 和其他必需品

python3-pip在 Kali 儲存庫中可用。你/etc/apt/sources.list的配置錯誤。

使用以下命令:

echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list
sudo apt update
sudo apt upgrade
sudo apt install python3-pip

目前版本的 Debian 或Kalipython-pip中不再提供; 你可以安裝 Python 3 版本

sudo apt install python3-pip

引用自:https://unix.stackexchange.com/questions/669459