找不到安装 sh 文件命令

Install sh file command not found

您好,我是 linux 和 ssh 的 100% 新手。我目前无法通过我的 raspberry pi 上的 ssh 获取到 运行 的命令 3. 我安装的操作系统是 OSMC。我一直在按照此处列出的说明进行操作:https://zatarranl.wordpress.com/2017/01/08/howto-setup-a-spotify-connect-web-server-on-a-raspberry-pi-with-osmc/ 并且我在第 4 步。这是我 运行 遇到麻烦的地方。列出的命令:

curl -O curl -OL https://github.com/Fornoth/spotify-connect- 
web/releases/download/0.0.3-alpha/spotify-connect-web.sh3
chmod u+x spotify-connect-web.sh
./spotify-connect-web.sh install

None 的命令超过了第一个工作,除非我将对 sh 文件的引用从 spotify-connect-web.sh 更改为 spotify-connect-web.sh3。最后一条命令似乎仍然不起作用。它在执行时给我这个错误信息:

 ./spotify-connect-web.sh3: line 1: Not: command not found

您从中获取说明的站点出于某种原因在文章中的每个 link 后面显示一个数字。因此,您的 URL 末尾有一个错误的数字,并且当您尝试访问 URL 时,GitHub 收到 404 "Not found" 错误. Curl 正在将单词 "Not found" 写入其输出文件,而您正在尝试将生成的文件作为 shell 脚本执行:

bash-3.2$ curl -O curl -OL https://github.com/Fornoth/.../spotify-connect-web.sh3
curl: Remote file name has no length!
curl: try 'curl --help' or 'curl --manual' for more information
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9    0     9    0     0     44      0 --:--:-- --:--:-- --:--:--    44
bash-3.2$ ls
spotify-connect-web.sh3
bash-3.2$ cat spot*
Not Found

从末尾删除“3”会产生您可能期望的结果:

bash-3.2$ curl -O curl -OL https://github.com/Fornoth/.../spotify-connect-web.sh
                                                                                ^- no "3"
curl: Remote file name has no length!
curl: try 'curl --help' or 'curl --manual' for more information
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   612    0   612    0     0   2334      0 --:--:-- --:--:-- --:--:--  2335
100   531  100   531    0     0   1050      0 --:--:-- --:--:-- --:--:--  1050
bash-3.2$ ls
spotify-connect-web.sh
bash-3.2$ head spot*
#!/bin/bash
set -e

DIR=~/spotify-connect-web-chroot
...

我还会注意到您尝试下载的 spotify-connect-web 脚本版本已过期。参见 this page