use*_*363 5 permissions apt source-code
当我尝试为当前正在运行的内核获取源代码时出现以下错误。
目前我正在使用以下内核:
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
Run Code Online (Sandbox Code Playgroud)
我收到以下错误。我已将名称 http 更改为 htt,因为论坛不允许我发布许多链接。
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.
Run Code Online (Sandbox Code Playgroud)
请建议如何解决此错误并获取内核源代码。
您要求 apt-get 下载内核的源代码并将它们复制到您的/boot目录中。/boot不是世界可写的,因此您会收到以下错误:
Could not open file ... - open (13: Permission denied)
Run Code Online (Sandbox Code Playgroud)
只需apt-get source在另一个目录中运行,例如您的主目录:
$ cd
$ apt-get source linux-image-$(uname -r)
Run Code Online (Sandbox Code Playgroud)
永远不要把无用的文件放在你的主目录之外。使用sudo apt-get source肯定会做你想做的,但是你的/boot目录会被无用的文件和目录污染。这是一个非常糟糕的做法。
| 归档时间: |
|
| 查看次数: |
1557 次 |
| 最近记录: |