Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I got the following message on my Turnkey linux machine while trying to get the source code for my current version of PHP5:

root@lamp:~# apt-get source php5
Reading package lists... Done
Building dependancy tree
Reading stat information... Done
E: You must put some 'source' URIs in your sources.list

What does this message mean? Where is sources.list and what URIs should I put in it?

share|improve this question

closed as off topic by Skyhawk, Lucas Kauffman, EEAA, Magellan, Brent Pabst Nov 5 '12 at 14:34

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 2 down vote accepted

The sources file is usually located in /etc/apt/sources.list. The source URI's look identical to other URI's except they begin with deb-src instead of deb.

share|improve this answer
Are you saying instead of: deb http://archive.turnkeylinux.org/ubuntu lucid main it should be: deb-src http://archive.turnkeylinux.org/ubuntu lucid main ? that URI does not work: E: could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_lucid_universe_source_Sour‌​ces - open (2: Nosuch file or directory) –  recursion.ninja Nov 4 '12 at 1:36
Keep both lines in the file –  kernelpanic Nov 4 '12 at 1:43
I did, I added the additional deb-src line. Sorry, that wasn't clear. –  recursion.ninja Nov 4 '12 at 1:44
needed to apt-get update then source files downloaded correctly –  recursion.ninja Nov 4 '12 at 23:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.