1

I am running Ubuntu desktop 16.04 I tried to get the kernel sources using the command

apt-get source linux-image-$(uname -r)

as recommended in the Ubuntu wiki. I got the error

E: You must put some source URIs in your sources.list

I searched the web and found advice on editing sources.list, but don't know what specifically I need to do to get the kernel sources. I am new to this; can someone help?

muru
  • 197,895
  • 55
  • 485
  • 740
  • Specifically for the kernel, you need at least one deb-src line with main in it. – muru May 17 '16 at 21:51
  • OK., so I tried editing the sources.list file, but of course, it is read-only. The system keeps asking me for the root (or sudo) password, but I was not asked to specify one when installing the system (which I did by running the standard UI-based install onto a VM. How do I find the root password? – Uresh Vahalia May 18 '16 at 05:31
  • You might have to reset (!) it: http://askubuntu.com/q/24006/158442 – muru May 18 '16 at 05:46
  • Thanks Muru. I edited the sources.list file and uncommented the deb-src lines that were present. One such line is "deb-src http://us.archive.ubuntu.com/ubuntu/ xental main restricted" and other similar lines for updates, etc. – Uresh Vahalia May 18 '16 at 15:10
  • Now it proceeds a little further, saying "Reading package lists ... Done" before giving the same error (E: You must put some source URIs in your sources.list). Is there some specific line I must add to this file? – Uresh Vahalia May 18 '16 at 15:11
  • 1
    did you run sudo apt-get update after modifying that file? – muru May 18 '16 at 15:19

0 Answers0