wnlen / clash-for-linux

clash-for-linux
1.34k stars 495 forks source link

无法运行,可能是编码格式导致的,转为utf8后仍无法解决 #27

Open HaoyyLi opened 3 months ago

HaoyyLi commented 3 months ago

start.sh: line 2: $'\r': command not found start.sh: line 5: $'\r': command not found start.sh: line 7: $'\r': command not found start.sh: line 10: $'\r': command not found : No such file or directorya/private/new_env_software/clash-for-linux start.sh: line 13: $'\r': command not found chmod: cannot access '/opt/data/private/new_env_software/clash-for-linux'$'\r''/bin/'$'\r': No such file or directory chmod: cannot access '/opt/data/private/new_env_software/clash-for-linux'$'\r''/scripts/'$'\r': No such file or directory chmod: cannot access '/opt/data/private/new_env_software/clash-for-linux'$'\r''/tools/subconverter/subconverter'$'\r': No such file or directory start.sh: line 18: $'\r': command not found start.sh: line 19: $'\r': command not found start.sh: line 20: $'\r': command not found start.sh: line 22: $'\r': command not found start.sh: line 26: $'\r': command not found start.sh: line 28: CLASH_URL: Error: CLASH_URL variable is not set or empty

ultwcz commented 2 months ago

First, you should set CLASH_URL in .env files, and option set CLASH_SECRET

inversionhourglass commented 2 weeks ago

脚本应该是在windows环境下写的,sh文件里面包含/r符号,可以通过下面的命令把所有/r都去掉

find . -type f -name "*.sh" -exec sed -i 's/\r$//' {} +