"install.sh: No such file or directory" 执行knife solo prepare时
"install.sh: No such file or directory" when execute knife solo prepare
knife solo 准备失败。
好像没有权限创建install.sh.
Warning: Failed to create the file install.sh: Permission denied
bash: install.sh: No such file or directory
你是怎么解决的?
$ knife solo prepare -VV <nodename>
DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
stdout: Warning: Failed to create the file install.sh: Permission denied
Warning: Failed to create the file install.sh: Permission denied
DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
51 23110 51 11925 0 0 18535 0 0:00:01 --:--:-- 0:00:01 18517
51 23110 51 11925 0 0 18535 0 0:00:01 --:--:-- 0:00:01 18517
DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
stdout: curl: (23) Failed writing body (0 != 11925)
curl: (23) Failed writing body (0 != 11925)
DEBUG: Initial command sudo bash install.sh -v 13.12.14
DEBUG: Running processed command sudo -p 'knife sudo password: ' bash install.sh -v 13.12.14
DEBUG: sudo -p 'knife sudo password: ' bash install.sh -v 13.12.14 stdout: bash: install.sh: No such file or directory
bash: install.sh: No such file or directory
Chef 版本是 13.12.14。
Chef 执行程序在远程主机上的 HOME 目录的所有者不正确。
通过执行以下命令解决。
$ ssh <nodename> sudo chown <user> /home/<user>
knife solo 准备失败。 好像没有权限创建install.sh.
Warning: Failed to create the file install.sh: Permission denied
bash: install.sh: No such file or directory
你是怎么解决的?
$ knife solo prepare -VV <nodename>
DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
stdout: Warning: Failed to create the file install.sh: Permission denied
Warning: Failed to create the file install.sh: Permission denied
DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
51 23110 51 11925 0 0 18535 0 0:00:01 --:--:-- 0:00:01 18517
51 23110 51 11925 0 0 18535 0 0:00:01 --:--:-- 0:00:01 18517
DEBUG: /bin/sh -c " if command -v curl >/dev/null 2>&1; then curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh'; else wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh'; fi; "
stdout: curl: (23) Failed writing body (0 != 11925)
curl: (23) Failed writing body (0 != 11925)
DEBUG: Initial command sudo bash install.sh -v 13.12.14
DEBUG: Running processed command sudo -p 'knife sudo password: ' bash install.sh -v 13.12.14
DEBUG: sudo -p 'knife sudo password: ' bash install.sh -v 13.12.14 stdout: bash: install.sh: No such file or directory
bash: install.sh: No such file or directory
Chef 版本是 13.12.14。
Chef 执行程序在远程主机上的 HOME 目录的所有者不正确。
通过执行以下命令解决。
$ ssh <nodename> sudo chown <user> /home/<user>