apernet / tcp-brutal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

有一个问题反馈

seagullz4 opened this issue · comments

问了chatgpt我也没解决办法就来问你了,我的内核是bbr的6.6.1版本,但是我无法安装你的这个模块请看问题代码如下:

root@hks1-20231110231330b4e904:# bash <(curl -fsSL https://tcp.hy2.sh/)
Checking linux-headers ... ok
Cleaning old installations ...
Checking installed version ... v1.0.0
Checking latest version ... v1.0.0
Rebuilding DKMS modules as needed ...
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j1 KERNELRELEASE=6.6.1 KERNEL_DIR=/lib/modules/6.6.1/build all...(bad exit status: 2)
ERROR (dkms apport): binary package for tcp-brutal: 1.0.0 not found
Error! Bad return status for module build on kernel: 6.6.1 (x86_64)
Consult /var/lib/dkms/tcp-brutal/1.0.0/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.6.1
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@hks1-20231110231330b4e904:
# uname -r
6.6.1

可以看下图片,请宇宙第一帅哥看一下Screenshot_2023-11-15-12-11-44-783_com.server.auditor.ssh.client.jpg

谢谢你

执行下面这个命令, 把输出贴出来:

cat /var/lib/dkms/tcp-brutal/1.0.0/build/make.log

执行下面这个命令, 把输出贴出来:

cat /var/lib/dkms/tcp-brutal/1.0.0/build/make.log
root@hks1-20231110231330b4e904:~# cat /var/lib/dkms/tcp-brutal/1.0.0/build/make.log
DKMS make.log for tcp-brutal-1.0.0 for kernel 6.6.1 (x86_64)
Wed 15 Nov 2023 06:02:52 AM UTC
make -C /lib/modules/6.6.1/build M=/var/lib/dkms/tcp-brutal/1.0.0/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.1'
  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.
make[2]: *** [/usr/src/linux-headers-6.6.1/Makefile:806: include/config/auto.conf] Error 1
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.1'
make: *** [Makefile:13: all] Error 2
root@hks1-20231110231330b4e904:~# —

看起来你的发行版有点奇怪。

能否提供这个 Linux 发行版的具体名称和版本? 通常可以通过 cat /etc/os-release 或者 cat /etc/lsb-release 获得这些信息, 你也可以安装并执行 neofetch 或者 screenfetch 这样的命令来获得这个信息。

看起来你的发行版有点奇怪。

能否提供这个 Linux 发行版的具体名称和版本? 通常可以通过 cat /etc/os-release 或者 cat /etc/lsb-release 获得这些信息, 你也可以安装并执行 neofetch 或者 screenfetch 这样的命令来获得这个信息。

ubuntu20.04,内核刚开始用的是bbr最新版,后面改成xanmod内核了

看起来你的发行版有点奇怪。

能否提供这个 Linux 发行版的具体名称和版本? 通常可以通过 cat /etc/os-release 或者 cat /etc/lsb-release 获得这些信息, 你也可以安装并执行 neofetch 或者 screenfetch 这样的命令来获得这个信息。

Screenshot_2023-11-15-15-25-06-962_com.server.auditor.ssh.client.jpg

我开了个 Ubuntu 20.04 的 vm, 从 这里 下载了 6.6.1 的 image 和 headers , 安装之后, uname -r 的输出是 6.6.1-x64v2-xanmod1 , 而在你的例子中, uname -r 的输出显然是 6.6.1

因此, 我怀疑你遇到这个问题的原因是, 你在从「bbr最新版」内核更换到 xanmod 内核后, 没有卸载 bbr 内核, 由于 grub 默认是用 版本号最新 的内核启动, 这导致你实际上使用的是你之前的「bbr最新版」内核。

此外, 我还注意到 Ubuntu 20.04 的 gcc 版本太旧, 实际上也无法为 6.x 的 xanmod 的内核编译内核模块, 你可能还需要先更新 gcc。 建议换比较新的发行版, 或者尝试使用 5.8 之后的 5.x 内核。

make -C /lib/modules/6.6.1-x64v2-xanmod1/build M=/var/lib/dkms/tcp-brutal/1.0.0/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.1-x64v2-xanmod1'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-13 (Debian 13.2.0-5) 13.2.0
  You are using:           gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
  CC [M]  /var/lib/dkms/tcp-brutal/1.0.0/build/brutal.o
gcc: error: unrecognized command line option ‘-mharden-sls=all’
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/tcp-brutal/1.0.0/build/brutal.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.1-x64v2-xanmod1/Makefile:2068: /var/lib/dkms/tcp-brutal/1.0.0/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.1-x64v2-xanmod1'
make: *** [Makefile:13: all] Error 2

应该是不支持xanmod1的内核了。因为xanmod1支持了BBR3,我的一些机器都换了这个内核。。安装brutal都失败了。

make -j2 KERNELRELEASE=6.5.12-x64v4-xanmod1 KERNEL_DIR=/lib/modules/6.5.12-x64v4-xanmod1/build all...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.5.12-x64v4-xanmod1 (x86_64)
Consult /var/lib/dkms/tcp-brutal/1.0.1/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.5.12-x64v4-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): error: tcp-brutal is successfully installed, but failed to load, this might cause by mismatched linux-headers.
bash <(curl -fsSL https://tcp.hy2.sh): error: If you update your system recently, reboot the system might solve this.
DKMS make.log for tcp-brutal-1.0.1 for kernel 6.5.12-x64v4-xanmod1 (x86_64)
Tue Nov 28 17:39:17 CST 2023
make -C /lib/modules/6.5.12-x64v4-xanmod1/build M=/var/lib/dkms/tcp-brutal/1.0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.12-x64v4-xanmod1'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-13 (Debian 13.2.0-5) 13.2.0
  You are using:           gcc (Debian 10.2.1-6) 10.2.1 20210110
  CC [M]  /var/lib/dkms/tcp-brutal/1.0.1/build/brutal.o
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/tcp-brutal/1.0.1/build/brutal.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.12-x64v4-xanmod1/Makefile:2189: /var/lib/dkms/tcp-brutal/1.0.1/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.12-x64v4-xanmod1'
make: *** [Makefile:13: all] Error 2

1、编译安装GCC-13,,劝退,,头皮发麻。

2、降回5.10的内核版本。。放弃xanmod1。。

不是不支持 xanmod1 的内核, 而是 gcc 太老了。
在小鸡上编译安装 gcc 是不现实的, 即使是用 32c64t 的 CPU 编译也要半个小时, 要是真有这个配置也不如直接开虚拟机来得方便。
个人觉得 bbr1 足够应付大多数场景, 如果一定要用的话你可以考虑升级整个系统到 Ubuntu 22.04 LTS, gcc 版本就能顺带更新上去了。

应该是不支持xanmod1的内核了。因为xanmod1支持了BBR3,我的一些机器都换了这个内核。。安装brutal都失败了。

make -j2 KERNELRELEASE=6.5.12-x64v4-xanmod1 KERNEL_DIR=/lib/modules/6.5.12-x64v4-xanmod1/build all...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.5.12-x64v4-xanmod1 (x86_64)
Consult /var/lib/dkms/tcp-brutal/1.0.1/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.5.12-x64v4-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): error: tcp-brutal is successfully installed, but failed to load, this might cause by mismatched linux-headers.
bash <(curl -fsSL https://tcp.hy2.sh): error: If you update your system recently, reboot the system might solve this.
DKMS make.log for tcp-brutal-1.0.1 for kernel 6.5.12-x64v4-xanmod1 (x86_64)
Tue Nov 28 17:39:17 CST 2023
make -C /lib/modules/6.5.12-x64v4-xanmod1/build M=/var/lib/dkms/tcp-brutal/1.0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.12-x64v4-xanmod1'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-13 (Debian 13.2.0-5) 13.2.0
  You are using:           gcc (Debian 10.2.1-6) 10.2.1 20210110
  CC [M]  /var/lib/dkms/tcp-brutal/1.0.1/build/brutal.o
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/tcp-brutal/1.0.1/build/brutal.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.12-x64v4-xanmod1/Makefile:2189: /var/lib/dkms/tcp-brutal/1.0.1/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.12-x64v4-xanmod1'
make: *** [Makefile:13: all] Error 2

1、编译安装GCC-13,,劝退,,头皮发麻。

2、降回5.10的内核版本。。放弃xanmod1。。

20.04非编译升级GCC13和GLIBC_2.33/GLIBC_2.34成功,终于把TCP Brutal正确安装在20.04。
image

我也遇到这个问题,可以分享一下吗?

@rdgjiose

我也遇到这个问题,可以分享一下吗?

直接参考 #7 即可