3

I am getting following error when i try to fetch source for my current running kernel.

At present i am using following kernel:

ignite@ignite:~$ uname -a
Linux ignite 3.5.0-17-generic #28-Ubuntu SMP
Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux

I got following error. i have changed name http to htt because forum do not allow me to post many links.

ignite@ignite:/boot$ apt-get source linux-image-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'linux' as source package instead of 'linux-image-3.5.0-17-generic'
NOTICE: 'linux' packaging is maintained in the 'Git' version control system at:
http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-quantal.git
Need to get 106 MB of source archives.
Err http://my.archive.ubuntu.com/ubuntu/ quantal-updates/main linux 3.5.0-30.51 (dsc)
  404  Not Found [IP: 91.189.92.202 80]
Err http://my.archive.ubuntu.com/ubuntu/ quantal-updates/main linux 3.5.0-30.51 (tar)  
  Could not open file linux_3.5.0.orig.tar.gz - open (13: Permission denied) [IP: 91.189.92.202 80]
Err http://my.archive.ubuntu.com/ubuntu/ quantal-updates/main linux 3.5.0-30.51 (diff)
  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://my.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.5.0-30.51.dsc
  404  Not Found [IP: 91.189.92.202 80]
Failed to fetch http://my.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.5.0.orig.tar.gz
  Could not open file linux_3.5.0.orig.tar.gz - open (13: Permission denied) [IP: 91.189.92.202 80]
Failed to fetch http://my.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.5.0-30.51.diff.gz
  404  Not Found [IP: 91.189.91.13 80]
E: Failed to fetch some archives.

Please suggest how to resolve this error & fetch kernel source.

  • sudo apt-get install linux-source-3.5 this command works.. i think i missed suo. – user6363 Oct 5 '13 at 11:32
5

You are asking apt-get to download the sources of the kernel and copy them inside your /boot directory. /boot is not world-writable, hence you are getting these errors:

Could not open file ... - open (13: Permission denied)

Just run apt-get source in an another directory, e.g. your home directory:

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

Never place useless files outside your home directory. Using sudo apt-get source will surely do what you want, however your /boot directory will be polluted with useless files and directories. This is a really bad practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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