Closed bike3097a closed 1 month ago
可以看看 cat /var/lib/dkms/tcp-brutal/1.0.2/build/make.log
的输出。
注意到你在 Debian 11 上使用 6.x 的 xanmod1 内核, 我猜是已安装 gcc 版本和编译内核用的 gcc 版本不一致的问题。
或许可以看看 #7 和 #18 。
日志已图片形式上传,麻烦看下啥问题。
建议按 #18 的方法装个 gcc-13 试试。
我们已经找到了个更好的办法了: https://gist.github.com/haruue/9dff23f9b7a80ec7bdc0d69feda0dff2
这个是成功还是失败呀。
失败了。
再看下 cat /var/lib/dkms/tcp-brutal/1.0.2/build/make.log
的输出?
cat /var/lib/dkms/tcp-brutal/1.0.2/build/make.log DKMS make.log for tcp-brutal-1.0.2 for kernel 6.9.11-x64v3-xanmod1 (x86_64) Fri 26 Jul 2024 04:45:27 AM UTC make -C /lib/modules/6.9.11-x64v3-xanmod1/build M=/var/lib/dkms/tcp-brutal/1.0.2/build modules make[1]: Entering directory '/usr/src/linux-headers-6.9.11-x64v3-xanmod1' warning: the compiler differs from the one used to build the kernel The kernel was built by: gcc-13 (Debian 13.3.0-1) 13.3.0 You are using: gcc (Debian 10.2.1-6) 10.2.1 20210110 CC [M] /var/lib/dkms/tcp-brutal/1.0.2/build/brutal.o /var/lib/dkms/tcp-brutal/1.0.2/build/brutal.c:38:5: warning: no previous prototype for ‘tcp_sock_get_sec’ [-Wmissing-prototypes] 38 | u64 tcp_sock_get_sec(const struct tcp_sock *tp) | ^
~~~./tools/objtool/objtool: /lib/x86_64-linux-gnu/libc.so.6: versionGLIBC_2.33' not found (required by ./tools/objtool/objtool) ./tools/objtool/objtool: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.34' not found (required by ./tools/objtool/objtool) make[3]: [scripts/Makefile.build:244: /var/lib/dkms/tcp-brutal/1.0.2/build/brutal.o] Error 1 make[3]: Deleting file '/var/lib/dkms/tcp-brutal/1.0.2/build/brutal.o' make[2]: [/usr/src/linux-headers-6.9.11-x64v3-xanmod1/Makefile:2070: /var/lib/dkms/tcp-brutal/1.0.2/build] Error 2 make[1]: [Makefile:240: __sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-6.9.11-x64v3-xanmod1' make: *** [Makefile:13: all] Error 2
您好。 试试看用这里的办法修复一下你的 linux-headers https://gist.github.com/haruue/9dff23f9b7a80ec7bdc0d69feda0dff2
我用的就是这个方法,无效
缺少一步,我先试下
Building module: cleaning build area... make -j1 KERNELRELEASE=6.9.11-x64v3-xanmod1 KERNEL_DIR=/lib/modules/6.9.11-x64v3-xanmod1/build all..... cleaning build area...
DKMS: build completed.
brutal.ko: Running module version sanity check.
depmod........
DKMS: install completed.
编译成功了。
你可以用 modprobe brutal
加载这个模块。
谢谢,可以了,加载了,没有报错,也没有提示任何信息,应该是成功了吧
`root@C20240615074802:~# bash <(curl -fsSL https://tcp.hy2.sh/) Checking linux-headers ... ok Cleaning old installations ... Checking installed version ... v1.0.2 Checking latest version ... v1.0.2 Rebuilding DKMS modules as needed ...
Kernel preparation unnecessary for this kernel. Skipping...
Building module: cleaning build area... make -j1 KERNELRELEASE=6.9.10-x64v3-xanmod1 KERNEL_DIR=/lib/modules/6.9.10-x64v3-xanmod1/build all....(bad exit status: 2) Error! Bad return status for module build on kernel: 6.9.10-x64v3-xanmod1 (x86_64) Consult /var/lib/dkms/tcp-brutal/1.0.2/build/make.log for more information. Enabling auto load kernel module brutal on system boot ... ok Loading kernel module brutal ... modprobe: FATAL: Module brutal not found in directory /lib/modules/6.9.10-x64v3-xanmod1 bash <(curl -fsSL https://tcp.hy2.sh): error: Failed to load kernel module, kernel module might not be installed successfully. bash <(curl -fsSL https://tcp.hy2.sh): warning: tcp-brutal is installed but failed to load. There is nothing to do today. root@C20240615074802:~#`