This error occurs when apt finds a package mentioned as a dependency but can't locate it in any enabled repository. Usually fixed by updating package lists, checking repository configuration, or fixing broken dependencies.
This error happens when the apt package manager knows a package exists (because another package depends on it or it's in the local cache), but it cannot find any installable version of that package in your currently enabled repositories. The package might have been removed from repositories you're using, exist only in disabled repositories, or be a virtual package that doesn't have an actual implementation available. APT maintains metadata about packages even after they're no longer available, which is why it knows about them but can't install them.
The most common cause is stale package metadata. Update apt's cache to reflect current repository contents:
sudo apt updateTry your installation again after updating. If you're still seeing the error, proceed to the next step.
Use apt-cache to get detailed information about the package:
apt-cache show package-name
apt-cache policy package-nameThis shows which repositories know about the package and what versions are available. If output is empty, the package doesn't exist in any enabled repository.
On Ubuntu systems, some packages live in disabled repositories. Enable them based on your needs:
# Enable universe repository
sudo add-apt-repository universe
# Enable multiverse repository (for restricted software)
sudo add-apt-repository multiverse
# Then update
sudo apt updateOn Debian, check if your sources.list needs additional entries for backports or testing versions.
If the error appears as part of broken dependency chains, use apt's built-in repair:
sudo apt --fix-broken installOr alternatively:
sudo apt install -fThis attempts to automatically resolve dependency conflicts by removing or installing packages as needed.
A corrupted cache can cause this issue. Clear it and rebuild:
sudo apt clean
sudo apt autoclean
sudo apt updateIf this still doesn't work, do a deeper cache rebuild:
sudo rm -r /var/lib/apt/lists/*
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt updateBe careful with the second method—ensure you include the wildcard at the end.
If your system has partially installed or corrupted packages, reconfigure dpkg:
sudo dpkg --configure -aThis attempts to configure any packages that were unpacked but not fully installed, which sometimes resolves dependency database corruption.
If you're seeing this error with a package that appears in multiple Ubuntu/Debian versions, you may have mixed version packages on your system. Check your sources.list and PPAs for conflicting version specifications. You can use 'apt-cache search package-name' to find alternative packages or newer package names if the one you're looking for has been renamed or superseded.
For PPA packages, the error often indicates the PPA doesn't support your current Ubuntu version. Check the PPA maintainer's documentation or search for alternatives for your specific Ubuntu release.
If using Docker or other containerized environments, ensure your base image's repository sources are compatible with the packages you're trying to install.
E: Could not connect to proxy server
Could not connect to proxy server
E: Package 'package:i386' has no installation candidate
How to fix "Package package:i386 has no installation candidate" in apt
E: The value 'value' is invalid for APT::Default-Release
How to fix invalid APT::Default-Release value in APT
dpkg: error: unable to create new file 'path': Permission denied
How to fix dpkg permission denied errors in APT
subprocess installed post-removal script returned error exit status 1
How to fix "subprocess installed post-removal script returned error exit status 1" in APT