apernet / tcp-brutal

GNU General Public License v3.0
619 stars 67 forks source link

报错,内核6.9.10,debian11系统 #21

Closed bike3097a closed 1 month ago

bike3097a commented 1 month ago

`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:~#`

haruue commented 1 month ago

可以看看 cat /var/lib/dkms/tcp-brutal/1.0.2/build/make.log 的输出。 注意到你在 Debian 11 上使用 6.x 的 xanmod1 内核, 我猜是已安装 gcc 版本和编译内核用的 gcc 版本不一致的问题。 或许可以看看 #7 和 #18 。

bike3097a commented 1 month ago

日志已图片形式上传,麻烦看下啥问题。 Screenshot_20240724_214650

haruue commented 1 month ago

建议按 #18 的方法装个 gcc-13 试试。

我们已经找到了个更好的办法了: https://gist.github.com/haruue/9dff23f9b7a80ec7bdc0d69feda0dff2

bike3097a commented 1 month ago

Screenshot_20240726_121818 这个是成功还是失败呀。

haruue commented 1 month ago

失败了。 再看下 cat /var/lib/dkms/tcp-brutal/1.0.2/build/make.log 的输出?

bike3097a commented 1 month ago

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: version GLIBC_2.33' not found (required by ./tools/objtool/objtool) ./tools/objtool/objtool: /lib/x86_64-linux-gnu/libc.so.6: versionGLIBC_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

haruue commented 1 month ago

您好。 试试看用这里的办法修复一下你的 linux-headers https://gist.github.com/haruue/9dff23f9b7a80ec7bdc0d69feda0dff2

bike3097a commented 1 month ago

我用的就是这个方法,无效

bike3097a commented 1 month ago

缺少一步,我先试下

bike3097a commented 1 month ago

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.

haruue commented 1 month ago

编译成功了。 你可以用 modprobe brutal 加载这个模块。

bike3097a commented 1 month ago

谢谢,可以了,加载了,没有报错,也没有提示任何信息,应该是成功了吧

haruue commented 1 month ago

您好。

您可以配置支持 tcp-brutal 的代理软件(比如 sing-box)来试试看模块有没有正常工作。

如果您只需要验证模块是否工作(通常并不会是这样的), 也可以参考 测速 一节的方法, 通过本仓库提供的示例脚本进行验证。 比如在一个终端窗口启动服务端之后, 在另一个终端窗口中执行 python3 client.py 127.0.0.1 10, 如果测得传输速度为 10 Mbps, 说明模块已正常工作。