Tech Journal Back to Tech Journal

apt-get says E: Couldn't find package package-name. What should I do?

First off, check your source list of packages. It resides in /etc/apt/sources.list or in the files in /etc/apt/sources.list.d/. If both are empty, then apt-get doesn't know where to get the packages from. Here's a sample sources.list file:

# See sources.list(5) for more information, especially
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb stable main contrib non-free
deb stable/non-US main contrib non-free
deb stable/updates main contrib non-free

# Uncomment if you want the apt-get source function to work
#deb-src stable main contrib non-free
#deb-src stable/non-US main contrib non-free

Secondly, you may have forgotten to run apt-get update after editing the sources.list file. To fix this, just run:

$ apt-get update

That's it.

Last updated on 2008-05-21 07:40:03 -0700, by Shalom Craimer

Back to Tech Journal