如何修复 Linux 错误:Package 'libjpeg8-dev' has no installation candidate

问题:

尝试使用 apt 或类似工具安装 libjpeg8-dev 时,你看到以下错误消息:

apt_error.txt
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libjpeg8-dev 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:
  libjpeg62-turbo-dev:armhf libjpeg62-turbo-dev

E: Package 'libjpeg8-dev' has no installation candidate

解决方案

如你在错误消息中所见,现在要安装的正确包名是 libjpeg62-turbo-dev。因此,使用以下命令安装

install_libjpeg.sh
sudo apt -y install libjpeg62-turbo-dev

Check out similar posts by category: Linux