Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 194390  / 2 Years ago, wed, january 26, 2022, 10:38:54

It is not unusual for a user of Ubuntu (or other distro using the apt package management tool to encounter the error:


user@box ~ $ sudo apt install x
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package x 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 'x' has no installation candidate

There have been several questions asked concerning this on various Stack Exchange sites, for example Package network-manager-openvpn is not available on Ask Ubuntu, but these are generally about how to obtain the specific package despite the error.


I have found no package that is not found simply (though not always easily) by determining if it is still distributed, and under which repository, and ensuring the repository is in sources.list, or if the worst comes to worst, downloading a .deb file or a source file to compile.


So my question is more general, and although I am guessing it has a rather simple and therefore non-exciting answer I cannot think how to find it by conventional search engine methods, so I turn to Ask Ubuntu.



Is there a command or option I can use to determine what package(s) reference the missing package?



More From » apt

 Answers
1

You can search for the package with apt-cache:



apt-cache search x


This will output all packages that in a way or another make a reference to x.


[#27960] Thursday, January 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
disdry

Total Points: 133
Total Questions: 128
Total Answers: 109

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
;