我正在尝试准备 Debian 8.9 启动盘这些说明。获取内核映像apt
是此过程的一部分。但是,如果我尝试
apt install linux-image-`uname -r`
我遇到了以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-4.8.0-53-generic
E: Couldn't find any package by regex 'linux-image-4.8.0-53-generic'
我/etc/apt/sources.list
的如下:
deb http://ftp.au.debian.org/debian/ jessie main contrib non-free
/boot/vmlinuz-4.8.0-53-generic
获取Debian 包(或等效包)的适当方法是什么?
答案1
您无法安装linux-image-4.8.0-53-generic
使用sources.list
:
deb http://ftp.au.debian.org/debian/ jessie main contrib non-free
因为该包属于 Ubuntu。
唯一适用linux-image
于 Debian Jessie 的main
组件是inux-映像-3.16.0-4-amd64
您应该sources.list
按如下方式编辑:
deb http://ftp.au.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/debian-security jessie/updates main
然后:
apt update
apt install linux-image-3.16.0-4-amd64
答案2
我通过将“主机”的内核映像复制到“客户机”的文件系统中来解决这个问题。这相当于在以下操作之前执行此复制chroot $TARGET
:
cp /boot/vmlinuz-4.8.0-53-generic $TARGET/boot/vmlinuz-4.8.0-53-generic
答案3
以下是你可能需要做的事情
sudo apt-get update # This will update the repositories list
sudo apt-get upgrade # This will update all the necessary packages on your system
sudo apt-get dist-upgrade # This will add/remove any needed packages
reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot
sudo apt-get install linux-image-$(uname -r) # This should work now