使用 sh 脚本将 json 文件下载到损坏的根目录
download json file to root directory corrupt using sh script
脚本失败:
curl -OL https://github.com/xmrig/xmrig/releases/download/v6.16.3/xmrig-6.16.3-focal-x64.tar.gz
tar -xf xmrig-6.16.3-focal-x64.tar.gz
mv xmrig-6.16.3/xmrig /usr/local/bin
rm -r xmrig-6.16.3 xmrig-6.16.3-focal-x64.tar.gz
cd /usr/local/bin/
curl -OL https://raw.githubusercontent.com/1nachi/donate/config.json
xmrig
错误:
[2022-01-27 14:35:20.857] 400: Invalid request
[2022-01-27 14:35:20.857] ^
[2022-01-27 14:35:20.857] /usr/local/bin/config.json<line:1, position:4>: "The document root must not be followed by other values."
试过:
cat /usr/local/bin/config.json
错误:400: Invalid request
wget
与 curl -OL
有同样的错误
运行 脚本手动工作正常。
(我需要此特定文件夹中的 config.json 以与仅限 root 的操作系统兼容)
试试这个 link(你跳过了 /main/):
https://raw.githubusercontent.com/1nachi/donate/main/config.json
curl -OL
https://github.com/xmrig/xmrig/releases/download/v6.16.3/xmrig-
6.16.3-focal-x64.tar.gz
tar -xf xmrig-6.16.3-focal-x64.tar.gz
mv xmrig-6.16.3/xmrig /usr/local/bin
rm -r xmrig-6.16.3 xmrig-6.16.3-focal-x64.tar.gz
cd /usr/local/bin/
curl -OL https://raw.githubusercontent.com/1nachi/donate/main/config.json
xmrig
脚本失败:
curl -OL https://github.com/xmrig/xmrig/releases/download/v6.16.3/xmrig-6.16.3-focal-x64.tar.gz
tar -xf xmrig-6.16.3-focal-x64.tar.gz
mv xmrig-6.16.3/xmrig /usr/local/bin
rm -r xmrig-6.16.3 xmrig-6.16.3-focal-x64.tar.gz
cd /usr/local/bin/
curl -OL https://raw.githubusercontent.com/1nachi/donate/config.json
xmrig
错误:
[2022-01-27 14:35:20.857] 400: Invalid request
[2022-01-27 14:35:20.857] ^
[2022-01-27 14:35:20.857] /usr/local/bin/config.json<line:1, position:4>: "The document root must not be followed by other values."
试过:
cat /usr/local/bin/config.json
错误:400: Invalid request
wget
与 curl -OL
有同样的错误
运行 脚本手动工作正常。
(我需要此特定文件夹中的 config.json 以与仅限 root 的操作系统兼容)
试试这个 link(你跳过了 /main/): https://raw.githubusercontent.com/1nachi/donate/main/config.json
curl -OL
https://github.com/xmrig/xmrig/releases/download/v6.16.3/xmrig-
6.16.3-focal-x64.tar.gz
tar -xf xmrig-6.16.3-focal-x64.tar.gz
mv xmrig-6.16.3/xmrig /usr/local/bin
rm -r xmrig-6.16.3 xmrig-6.16.3-focal-x64.tar.gz
cd /usr/local/bin/
curl -OL https://raw.githubusercontent.com/1nachi/donate/main/config.json
xmrig