fscarmen / warp-sh

WARP script is move to: https://gitlab.com/fscarmen/warp
798 stars 171 forks source link

wireguard-tools 安装失败,脚本中止,问题反馈:[https://github.com/fscarmen/warp-sh/issues] #90

Closed Hot-baby closed 1 month ago

Hot-baby commented 1 month ago

wireguard-tools 安装失败,脚本中止,问题反馈:[https://github.com/fscarmen/warp-sh/issues]

fscarmen commented 1 month ago

手动安装一下看看,有什么报错喂给 gpt 看看

danbao commented 1 month ago

错误报告

系统信息:

错误描述: 在尝试安装 wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh 6 时,脚本报错并中止,错误信息如下:

sed: /etc/wireguard/warp.conf: No such file or directory
wireguard-tools 安装失败,脚本中止,问题反馈: [https://github.com/fscarmen/warp-sh/issues]

手动安装尝试: 在手动执行 apk add wireguard-tools 后,错误信息如下:

sed: /etc/wireguard/warp.conf: No such file or directory
找不到配置文件 warp.conf,脚本中止,问题反馈: [https://github.com/fscarmen/warp-sh/issues]

执行 bash -x menu.sh 后返回下面详情


 请选择: 1
+ [[ 1 =~ ^[0-9]{1,2}$ ]]
+ ((  1 >= 0 && 1 < 15  ))
+ 'ACTION[1]'
+ stack_switch
+ SWITCH014='/AllowedIPs/s/#//g;s/^.*\:\:\/0/#&/g'
+ SWITCH01D=/AllowedIPs/s/#//g
+ SWITCH106='/AllowedIPs/s/#//g;s/^.*0\.\0\/0/#&/g'
+ SWITCH10D=/AllowedIPs/s/#//g
+ SWITCH114='/AllowedIPs/s/^.*\:\:\/0/#&/g'
+ SWITCH116='/AllowedIPs/s/^.*0\.\0\/0/#&/g'
+ [[ 0 = [35] ]]
+ check_stack
+ '[' -e /etc/wireguard/warp.conf ']'
+ case "$TRACE4" in
+ T4=1
+ case "$TRACE6" in
+ CASE=("@0" "0@" "0@0" "@1" "0@1" "1@" "1@0" "1@1" "@")
+ for m in ${!CASE[@]}
+ '[' 1@ = @0 ']'
+ for m in ${!CASE[@]}
+ '[' 1@ = 0@ ']'
+ for m in ${!CASE[@]}
+ '[' 1@ = 0@0 ']'
+ for m in ${!CASE[@]}
+ '[' 1@ = @1 ']'
+ for m in ${!CASE[@]}
+ '[' 1@ = 0@1 ']'
+ for m in ${!CASE[@]}
+ '[' 1@ = 1@ ']'
+ break
+ WARP_BEFORE=("" "" "" "WARP IPv6 only" "WARP IPv6" "WARP IPv4 only" "WARP IPv4" "$(text 70)")
++ text 70
++ grep -q '\$'
++ eval echo '${C[70]}'
+++ echo WARP 双栈
+ WARP_AFTER1=("" "" "" "WARP IPv4" "WARP IPv4" "WARP IPv6" "WARP IPv6" "WARP IPv4")
+ WARP_AFTER2=("" "" "" "$(text 70)" "$(text 70)" "$(text 70)" "$(text 70)" "WARP IPv6")
++ text 70
++ grep -q '\$'
++ eval echo '${C[70]}'
+++ echo WARP 双栈
++ text 70
++ grep -q '\$'
++ eval echo '${C[70]}'
+++ echo WARP 双栈
++ text 70
++ grep -q '\$'
++ eval echo '${C[70]}'
+++ echo WARP 双栈
++ text 70
++ grep -q '\$'
++ eval echo '${C[70]}'
+++ echo WARP 双栈
+ TO1=("" "" "" "014" "014" "106" "106" "114")
+ TO2=("" "" "" "01D" "01D" "10D" "10D" "116")
+ SHORTCUT1=("" "" "" "(warp 4)" "(warp 4)" "(warp 6)" "(warp 6)" "(warp 4)")
+ SHORTCUT2=("" "" "" "(warp d)" "(warp d)" "(warp d)" "(warp d)" "(warp 6)")
+ '[' 5 -le 3 ']'
+ '[' 5 = 8 ']'
+ [[ 1 = [12] ]]
++ eval echo '${TO1[m]}'
+++ echo 106
+ TO=106
+ '[' 3 '!=' 3 ']'
++ eval echo '$SWITCH106'
+++ echo '/AllowedIPs/s/#//g;s/^.*0\.\0\/0/#&/g'
+ sed -i '/AllowedIPs/s/#//g;s/^.*0\.\0\/0/#&/g' /etc/wireguard/warp.conf
sed: /etc/wireguard/warp.conf: No such file or directory
+ alpine_warp_restart
+ wg-quick down warp
+ wg-quick up warp
+ sleep 1
+ net
+ local NO_OUTPUT=
+ unset IP4 IP6 WAN4 WAN6 COUNTRY4 COUNTRY6 ASNORG4 ASNORG6 WARPSTATUS4 WARPSTATUS6 TYPE QUOTA
++ type -p wg-quick
+ '[' '!' -x /usr/bin/wg-quick ']'
+ '[' '!' -e /etc/wireguard/warp.conf ']'
++ text 190
++ grep -q '\$'
++ eval echo '${C[190]}'
+++ echo 找不到配置文件 'warp.conf,脚本中止,问题反馈:[https://github.com/fscarmen/warp-sh/issues]'
+ error ' 找不到配置文件 warp.conf,脚本中止,问题反馈:[https://github.com/fscarmen/warp-sh/issues] '
+ echo -e '\033[31m\033[01m 找不到配置文件 warp.conf,脚本中止,问题反馈:[https://github.com/fscarmen/warp-sh/issues] \033[0m'
 找不到配置文件 warp.conf,脚本中止,问题反馈:[https://github.com/fscarmen/warp-sh/issues]
+ exit 1
fscarmen commented 1 month ago

你手动运行 apk add wireguard-tools 看回显什么,肯定不是

sed: /etc/wireguard/warp.conf: No such file or directory 找不到配置文件 warp.conf,脚本中止,问题反馈: [https://github.com/fscarmen/warp-sh/issues]

danbao commented 1 month ago

手动安装 wireguard-tools 成功的,那个是安装成功后再次执行的报错

fscarmen commented 1 month ago

你再更新一下脚本安装多次,还是不行。方便的话,把 ssh 发到 fscarmen@gmail.com 我看看

danbao commented 1 month ago

给了 ssh 也连不了,我是在内网的软路由pve里面安装的alpine 3.20,本来想弄个 ipv6 来着😂

fscarmen commented 1 month ago

如果 wireguard-tools 你安装成功,试试 curl -sL "https://warp.cloudflare.now.cc/?run=register" ,如果可以的话,再运行 curl -sL "https://warp.cloudflare.now.cc/?run=register" > /etc/wireguard/warp.conf

danbao commented 1 month ago

@fscarmen 我知道原因了,我在路由器开了 openclash,然后已经有 ipv4 的 cloudflare 的 ip ,所以 menu.sh 以为我已经有 warp ipv4 了