I want to install a file libgmp-dev on my Debian Wheezy. Which repository should I add to my sources.list?
In general, how to find in which repository a given package/program is available? Or is it not at all available for the Debian? In the later case, I must install it from source. But I would like to install if one is available from a repo.
In other words, I guess I want to know: how do I know which repositories to add to my sources.list to fulfill my package installation requirements?
I have already seen the following question and its answers but it seems they work only on local cache.
How to tell from what Ubuntu or Debian repository a package comes?
Because if I run any of the following commands as suggested in the answers
$ apt-cache policy libgmp-dev
$ apt-cache show-pkg libgmp-dev
I always get the error: N: Unable to locate package libgmp-dev
Best Answer
This simply means APT does not think the package with the name matching exactly what you entered is available in any repository your local APT knows of.
What does this mean? One of these two things:
What can you do about this?
First, try to search the package cache (the list of all the packages from the repositories known to APT on your system) for a less precise name, something like
or even
might do the trick (you might want to pipe the output to
less
to be able to search further through it). For instance, the package might include a version in it, likelibgmp4-dev
(meaning there might belibgmp3-dev
available or something like this).Next, be sure APT knows about the repository containing that package.
On my Wheezy system, I have:
and
which means the package is available in the standard (main) Debian repository.
So… make sure you have that repository available:
/etc/apt/sources.list
.Try to find there an uncommented (not prefixed with the
#
character) line reading likeand if you don't have one, try adding
there, saving the file.
Run
to fetch the package list from that repository and adding the list of available packages from it to the local APT's cache.
Verify the package became available using