E:软件包‘python-imaging’没有安装候选项 Ubuntu 18.04

E:软件包‘python-imaging’没有安装候选项 Ubuntu 18.04

我正在尝试按照以下命令安装和配置 libvirtd:

sudo apt-get install python-libvirt libvirt-bin libvirt0 python-imaging python-numpy virtinst virt-viewer virt-manager

运行该程序后,出现错误:

Package python-imaging 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
However the following packages replace it:
  python-pil:i386 python-pil

E: Package 'python-imaging' has no installation candidate

我尝试按照这篇文章中的评论来安装 Python 图像库:

如何安装 Python 图像库(PIL)?

例如:

sudo apt-get build-dep python-imaging

运行此命令后,我收到以下消息:

Reading package lists... Done
E: You must put some 'source' URIs in your sources.list

有人在评论中说:

如果您收到错误“您必须将一些‘源’URI 放入您的 sources.list”,请确保您的 /etc/apt/sources.list 具有与您的 deb 条目匹配的 deb-src 条目。然后您必须将文件从服务器上的实际位置符号链接到 PIL 期望它们的位置。

这到底意味着什么?

答案1

从这个错误信息语句中:

However the following packages replace it: python-pil:i386 python-pil

看来您现在需要做的就是安装python-pil

sudo apt-get install python-pil python3-pil

整个命令如下:

sudo apt install python-libvirt libvirt-bin libvirt0 python-numpy virtinst virt-viewer virt-manager python-pil

相关内容