我正在尝试使用编译内核本指南但我收到了一个错误。
cp -rp "/home/stibbons/build/ubuntu-disco/debian/linux-headers-5.0.0-15-generic/usr/src/linux-headers-5.0.0-15-generic" "/home/stibbons/build/ubuntu-disco/debian/linux-headers-5.0.0-15/usr/src/linux-headers-5.0.0-15" "/home/stibbons/build/ubuntu-disco/debian/build/build-generic/___________________________________dkms/headers"
/bin/bash -e debian/scripts/dkms-build /home/stibbons/build/ubuntu-disco/debian/build/build-generic/___________________________________dkms 5.0.0-15-generic ' /home/stibbons/build/ubuntu-disco/debian/build/build-generic/scripts/sign-file sha512 /home/stibbons/build/ubuntu-disco/debian/build/build-generic/certs/signing_key.pem /home/stibbons/build/ubuntu-disco/debian/build/build-generic/certs/signing_key.x509' linux-modules-5.0.0-15-generic /home/stibbons/build/ubuntu-disco/debian/linux-modules-5.0.0-15-generic/lib/modules/5.0.0-15-generic/kernel spl pool/universe/s/spl-linux/spl-dkms__all.deb
II: dkms-build downloading spl (spl-dkms__all.deb)
--2019-05-16 23:04:11-- https://packagecloud.io/AtomEditor/atom/any/pool/universe/s/spl-linux/spl-dkms__all.deb
Resolving packagecloud.io (packagecloud.io)... 54.241.144.200, 52.9.242.175, 2600:1f1c:2e5:6901:4eff:41b9:710a:77ff, ...
Connecting to packagecloud.io (packagecloud.io)|54.241.144.200|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:11 ERROR 404: Not Found.
--2019-05-16 23:04:12-- http://security.ubuntu.com/ubuntu/pool/universe/s/spl-linux/spl-dkms__all.deb
Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.88.152, 91.189.88.161, 91.189.88.162, ...
Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.88.152|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:12 ERROR 404: Not Found.
--2019-05-16 23:04:12-- http://security.ubuntu.com/ubuntu/pool/main/s/spl-linux/spl-dkms__all.deb
Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.88.149, 91.189.91.26, 91.189.91.23, ...
Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.88.149|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:12 ERROR 404: Not Found.
--2019-05-16 23:04:12-- http://us.archive.ubuntu.com/ubuntu/pool/universe/s/spl-linux/spl-dkms__all.deb
Resolving us.archive.ubuntu.com (us.archive.ubuntu.com)... 91.189.91.23, 91.189.91.26, 2001:67c:1562::19
Connecting to us.archive.ubuntu.com (us.archive.ubuntu.com)|91.189.91.23|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:13 ERROR 404: Not Found.
--2019-05-16 23:04:13-- http://us.archive.ubuntu.com/ubuntu/pool/main/s/spl-linux/spl-dkms__all.deb
Resolving us.archive.ubuntu.com (us.archive.ubuntu.com)... 91.189.91.26, 91.189.91.23, 2001:67c:1562::19
Connecting to us.archive.ubuntu.com (us.archive.ubuntu.com)|91.189.91.26|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:13 ERROR 404: Not Found.
dpkg-deb: error: failed to read archive 'spl-dkms_*.deb': No such file or directory
make: *** [debian/rules.d/2-binary-arch.mk:219: install-generic] Error 2
知道如何解决这个问题吗?
答案1
@RedHatter我遇到了同样的问题,并将失败追溯到依赖于 gawk 的 debian/rules 中的版本字符串解析代码。
# Versions of dkms packages.
dkms_zfs_linux_version=$(shell gawk '/^zfs-linux / { print $$2; }' debian/dkms-versions)
dkms_spl_linux_version=$(shell gawk '/^spl-linux / { print $$2; }' debian/dkms-versions)
dkms_nvidia_version=$(shell gawk '/^nvidia-graphics-drivers-/ { print $$2; }' debian/dkms-versions)
当我在全新安装的 Kubuntu 上编译此程序时,gawk 默认不可用,导致静默失败。
sudo apt install gawk
在开始构建之前,对我来说修复起来很容易。
答案2
在我的 PC 上,这是由于缺少包造成的,原因是指南指示运行:
sudo apt-get install libncurses-dev flex bison openssl-dev libssl-dev dkms libelf-dev
失败是因为 Ubuntu 最新版本中不存在“openssl-dev”软件包,因此没有安装任何软件包。因此,您需要运行不带 openssl-dev 的命令:
sudo apt-get install libncurses-dev flex bison libssl-dev dkms libelf-dev
答案3
尝试:
sudo apt-get install spl-dkms