我正在尝试在我的 Kali Linux 操作系统上安装 VMWare 工作站播放器。但是,我在尝试启动 VMware 时遇到了内核问题:
未找到与您正在运行的内核匹配的 C 头文件。有关安装说明,请参阅您的发行版文档。
我尝试使用安装正确的标头apt install linux-headers-$(uname -r),这给了我以下输出:
正在读取包列表...构建依赖关系树...正在读取状态信息...
警告:apt 没有稳定的 CLI 界面。在脚本中谨慎使用。
E:无法找到软件包 linux-headers-4.12.0-kali1-amd64
E:无法通过 glob 'linux-headers-4.12.0-kali1-amd64' 找到任何软件包
E:无法通过正则表达式“linux-headers-4.12.0-kali1-amd64”找到任何包
apt 搜索 linux-headers
aufs-dkms - DKMS files to build and install aufs
linux-headers-4.14.0-kali1-all - All header files for Linux 4.14 (meta-package)
linux-headers-4.14.0-kali1-all-amd64 - All header files for Linux 4.14 (meta-package)
linux-headers-4.14.0-kali1-amd64 - Header files for Linux 4.14.0-kali1-amd64
linux-headers-4.14.0-kali1-common - Common header files for Linux 4.14.0-kali1
linux-headers-4.14.0-kali1-common-rt - Common header files for Linux 4.14.0-kali1-rt
linux-headers-4.14.0-kali1-rt-amd64 - Header files for Linux 4.14.0-kali1-rt-amd64
linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
linux-libc-dev-alpha-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-hppa-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-m68k-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64r6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mips64r6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32r6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsn32r6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsr6-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-mipsr6el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpcspe-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-s390x-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sh4-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-sparc64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-headers-4.14.0-kali1-686 - Header files for Linux 4.14.0-kali1-686
linux-headers-4.14.0-kali1-686-pae - Header files for Linux 4.14.0-kali1-686-pae
linux-headers-4.14.0-kali1-all-i386 - All header files for Linux 4.14 (meta-package)
linux-headers-4.14.0-kali1-rt-686-pae - Header files for Linux 4.14.0-kali1-rt-686-pae
linux-headers-686 - Header files for Linux 686 configuration (meta-package)
linux-headers-686-pae - Header files for Linux 686-pae configuration (meta-package)
linux-headers-rt-686-pae - Header files for Linux rt-686-pae configuration (meta-package)
linux-headers-4.12.0-kali1-common - Common header files for Linux 4.12.0-kali1
linux-headers-4.13.0-kali1-common - Common header files for Linux 4.13.0-kali1
linux-headers-4.13.0-kali1-amd64 - Header files for Linux 4.13.0-kali1-amd64
apt 搜索 linux-image
linux-headers-4.14.0-kali1-amd64 - Header files for Linux 4.14.0-kali1-amd64
linux-headers-4.14.0-kali1-rt-amd64 - Header files for Linux 4.14.0-kali1-rt-amd64
linux-image-4.14.0-kali1-amd64 - Linux 4.14 for 64-bit PCs
linux-image-4.14.0-kali1-amd64-dbg - Debug symbols for linux-image-4.14.0-kali1-amd64
linux-image-4.14.0-kali1-rt-amd64 - Linux 4.14 for 64-bit PCs, PREEMPT_RT
linux-image-4.14.0-kali1-rt-amd64-dbg - Debug symbols for linux-image-4.14.0-kali1-rt-amd64
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package)
linux-headers-4.14.0-kali1-686 - Header files for Linux 4.14.0-kali1-686
linux-headers-4.14.0-kali1-686-pae - Header files for Linux 4.14.0-kali1-686-pae
linux-headers-4.14.0-kali1-rt-686-pae - Header files for Linux 4.14.0-kali1-rt-686-pae
linux-image-4.14.0-kali1-686 - Linux 4.14 for older PCs
linux-image-4.14.0-kali1-686-dbg - Debug symbols for linux-image-4.14.0-kali1-686
linux-image-4.14.0-kali1-686-pae - Linux 4.14 for modern PCs
linux-image-4.14.0-kali1-686-pae-dbg - Debug symbols for linux-image-4.14.0-kali1-686-pae
linux-image-4.14.0-kali1-rt-686-pae - Linux 4.14 for modern PCs, PREEMPT_RT
linux-image-4.14.0-kali1-rt-686-pae-dbg - Debug symbols for linux-image-4.14.0-kali1-rt-686-pae
linux-image-686 - Linux for older PCs (meta-package)
linux-image-686-dbg - Debugging symbols for Linux 686 configuration (meta-package)
linux-image-686-pae - Linux for modern PCs (meta-package)
linux-image-686-pae-dbg - Debugging symbols for Linux 686-pae configuration (meta-package)
linux-image-rt-686-pae - Linux for modern PCs (meta-package), PREEMPT_RT
linux-image-rt-686-pae-dbg - Debugging symbols for Linux rt-686-pae configuration (meta-package)
linux-image-4.13.0-kali1-amd64-dbg - Debug symbols for linux-image-4.13.0-kali1-amd64
linux-headers-4.13.0-kali1-amd64 - Header files for Linux 4.13.0-kali1-amd64
linux-image-4.12.0-kali1-amd64 - Linux 4.12 for 64-bit PCs
到目前为止已尝试过
我已经尝试使用 apt 更新我的系统:update、autoremove、dist-upgrade、upgrade 等...
root@Anonymous:~# uname -r
4.12.0-kali1-amd64
root@Anonymous:~# sudo apt update && sudo apt upgrade
Hit:1 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:2 https://packages.microsoft.com/ubuntu/14.04/prod trusty InRelease
Hit:3 http://ftp1.nluug.nl/os/Linux/distr/kali kali-rolling InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
答案1
这Kali 官方滚动发布似乎没有什么可做的Linux 4.12
。但是,您使用的 Lug 镜像似乎确实包含一些较旧的文件。
看起来,唯一包含的 Kali 官方版本Linux 4.12
是2017.2
$ grep -n headers-4.1 Packages_2017.2
851688:Package: linux-headers-4.12.0-kali1-all
851694:Depends: linux-headers-4.12.0-kali1-all-amd64 (= 4.12.6-1kali6)
851698:Filename: pool/main/l/linux/linux-headers-4.12.0-kali1-all_4.12.6-1kali6_amd64.deb
851708:Package: linux-headers-4.12.0-kali1-all-amd64
851714:Depends: linux-headers-4.12.0-kali1-amd64 (= 4.12.6-1kali6)
851718:Filename: pool/main/l/linux/linux-headers-4.12.0-kali1-all-amd64_4.12.6-1kali6_amd64.deb
851728:Package: linux-headers-4.12.0-kali1-amd64
851734:Depends: linux-headers-4.12.0-kali1-common (= 4.12.6-1kali6), linux-kbuild-4.12, linux-compiler-gcc-6-x86
851738:Filename: pool/main/l/linux/linux-headers-4.12.0-kali1-amd64_4.12.6-1kali6_amd64.deb
851747: /usr/src/linux-headers-4.12.0-kali1-amd64, and can be used for building
851751:Package: linux-headers-4.12.0-kali1-common
851761:Filename: pool/main/l/linux/linux-headers-4.12.0-kali1-common_4.12.6-1kali6_all.deb
851770: linux-headers-4.12.0-kali1-(flavour) package, matching the flavour of the
851779:Depends: linux-headers-4.12.0-kali1-amd64
也许 Lug 存储库存在一些缺少软件包的问题。您可能需要使用最新的官方 Kali 版本或使用官方存储库重新映像您的安装2017.2
。
然而,Kali Linux 是一个专门的发行版,因此设置和维护可能相当困难。如果您不需要专门的工具,我强烈建议您选择其他发行版。
答案2
Kali live 上的内核更新已解决这里
简而言之,您想要从中启动并应复制到的新内核和 initrd
/live/vmlinuz
/live/initrd.img
和那些名字。
考虑到这一点,您执行的任何内核更新都可能(自然地)进入持久性分区,因此无法尽早用于实时启动。