E: Package ‘xxx‘ has no installation candidate

For example, after changing the Tsinghua source and installing 'libgtk2.0-dev', the following appears:

Package libgtk2.0-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

E: Package 'libgtk2.0-dev' has no installation candidate

Solution:
Insert image description here

reload
and then execute:

sudo apt-get update

Just install it again

sudo apt-get install libgtk2.0-dev

Guess you like

Origin blog.csdn.net/wave789/article/details/125290684