Ubuntu – Why apt can’t find the source code of any package


I'm trying to download source code of certain packages, for example rhythmbox, for learning purposes. I want to do this through apt-get, with the apt-get source command.

For some reason, apt-get can't seem to find any package. I've tried several packages, and I keep getting this output from apt-get:

$ apt-get source rhythmbox
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to find a source package for rhythmbox

I've been searching for answers for quite some time now, but I can't find anyone with the same issue. apt-get works fine with installing and updating so apt-get works fine in my opinion. During the search I also learned that I had to enable the 'source code repositories' in Software Sources, so that's also enabled.

I am aware of the fact that (maybe only for certain packages, not sure) source packages can also be downloaded with bzr from Launchpad, but I want to know why this method won't work.

Best Answer

Open the Software Center and choose Edit -> Software Sources. Which server do you use? I'm using "Server and United States" and just downloaded the source for rhythmbox just fine. I'm on Precise.

Related Question