我正在尝试在 kali linux Rolling 上安装 anaconda navigator,基于 debian,最新更新。我使用了 anaconda 官方 Linux 安装文档上找到的命令行https://docs.anaconda.com/anaconda/install/linux/:
apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
它总是显示此消息:
apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libasound2 is already the newest version (1.2.4-1.1).
libasound2 set to manually installed.
libxcomposite1 is already the newest version (1:0.4.5-1).
libxcomposite1 set to manually installed.
libxcursor1 is already the newest version (1:1.2.0-2).
libxcursor1 set to manually installed.
libxi6 is already the newest version (2:1.7.10-1).
libxi6 set to manually installed.
libxrandr2 is already the newest version (2:1.5.1-1).
libxrandr2 set to manually installed.
libxss1 is already the newest version (1:1.2.3-1).
libxss1 set to manually installed.
libxtst6 is already the newest version (2:1.2.3-1).
libxtst6 set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgl1-mesa-glx : Depends: libglapi-mesa (= 10.3.2-1+deb8u1) but 20.3.4-1 is to be installed
E: Unable to correct problems, you have held broken packages.
使用命令行安装 Tensorflow 时出现同样的问题:
sudo apt install libatlas-base-dev
欢迎任何帮助。
答案1
您已将 Debian Jessie 存储库添加到 Kali,这就是出现错误的原因unmet dependencies
。
使用以下命令修复您的源:
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list
sudo rm /etc/apt/sources.list.d/*
sudo apt update
sudo apt remove libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
要安装 Anaconda navigator,请从以下位置下载安装脚本:官方网站(它是一个bash脚本,默认情况下Kali Linux使用ZSH)或者使用以下命令:
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
sudo bash Anaconda3-2020.11-Linux-x86_64.sh
source ~/.bashrc