apernet / tcp-brutal

GNU General Public License v3.0
654 stars 70 forks source link

安装报错,好像是DKMS问题 #26

Closed iso-lib closed 2 months ago

iso-lib commented 2 months ago

debian12 内核:6.7.9-bbrplus

root@ip-172-26-8-41:~# bash <(curl -fsSL https://tcp.hy2.sh/)
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [38 B]
Get:2 file:/etc/apt/mirrors/debian-security.list Mirrorlist [47 B]
Hit:3 https://cdn-aws.deb.debian.org/debian bookworm InRelease
Hit:4 https://cdn-aws.deb.debian.org/debian bookworm-updates InRelease
Hit:5 https://cdn-aws.deb.debian.org/debian bookworm-backports InRelease
Hit:6 https://cdn-aws.deb.debian.org/debian-security bookworm-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Installing missing dependence 'dkms' with 'apt -y --no-install-recommends install' ... 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  menu
Recommended packages:
  fakeroot linux-headers-generic | linux-headers-686-pae | linux-headers-amd64 | linux-headers
The following NEW packages will be installed:
  dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 48.7 kB of archives.
After this operation, 190 kB of additional disk space will be used.
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [38 B]
Get:2 https://cdn-aws.deb.debian.org/debian bookworm/main amd64 dkms all 3.0.10-8+deb12u1 [48.7 kB]
Fetched 48.7 kB in 0s (978 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 51378 files and directories currently installed.)
Preparing to unpack .../dkms_3.0.10-8+deb12u1_all.deb ...
Unpacking dkms (3.0.10-8+deb12u1) ...
Setting up dkms (3.0.10-8+deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
ok
Checking linux-headers ... ok
Cleaning old installations ... 
Checking installed version ... not installed
Checking latest version ... v1.0.3
Downloading DKMS tarball: https://github.com/apernet/tcp-brutal/releases/download/v1.0.3/tcp-brutal.dkms.tar.gz ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  3532  100  3532    0     0   2779      0  0:00:01  0:00:01 --:--:--     0
Installing DKMS module from tarball file /tmp/brutalinst.yx3Ynm8XJZ.tar.gz ... 
/dev/fd/63: line 585: dkms: command not found
bash <(curl -fsSL https://tcp.hy2.sh): error: Failed to install DKMS tarball, please check above output or try to uninstall first.
root@ip-172-26-8-41:~# 
haruue commented 2 months ago
/dev/fd/63: line 585: dkms: command not found

看了下 Debian 上的 dkms 装好之后在 /usr/sbin/dkms, 能发一下下面这三个命令的输出吗?

type dkms
echo $PATH
dpkg-query -L dkms
iso-lib commented 2 months ago
/dev/fd/63: line 585: dkms: command not found

看了下 Debian 上的 dkms 装好之后在 /usr/sbin/dkms, 能发一下下面这三个命令的输出吗?

type dkms
echo $PATH
dpkg-query -L dkms

image

haruue commented 2 months ago

你可以试试看像下面这样将 /usr/sbin 临时加回 PATH 中, 然后重新执行安装脚本。

export PATH="/usr/sbin:$PATH"
bash <(curl -fsSL https://tcp.hy2.sh/)

在你的系统上, root 用户的 PATH 是 Debian 中普通用户的 PATH, 这些东西在 /etc/profile 定义

if [ "$(id -u)" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

我没见过什么通用的方式能导致这类问题。 或许你可以试试将 export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH" 加到你的 ~/.bashrc 文件的底部, 以尝试持久地解决这类问题。

iso-lib commented 2 months ago

你可以试试看像下面这样将 /usr/sbin 临时加回 PATH 中, 然后重新执行安装脚本。

export PATH="/usr/sbin:$PATH"
bash <(curl -fsSL https://tcp.hy2.sh/)

在你的系统上, root 用户的 PATH 是 Debian 中普通用户的 PATH, 这些东西在 /etc/profile 定义

if [ "$(id -u)" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

我没见过什么通用的方式能导致这类问题。 或许你可以试试将 export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH" 加到你的 ~/.bashrc 文件的底部, 以尝试持久地解决这类问题。

谢谢,确实如此,是环境变量里面的路径问题,已经顺利安装上了