Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

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

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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