我正在尝试构建一个脚本,nvm并最终在其中安装节点。
我已经安装nvm了cURL。我在.profile或.bashrc文件中看到了修改(都可以使用),并且nvm在bash提示符下键入时,它显示了可用的选项等。
因此nvm可以使用。我可以手动安装节点,但是只要将nvm命令放入shell脚本中:
nano test.sh
#!/bin/bash
nvm
并运行:
chmod 755 test.sh
./test.sh
我得到:
./test.sh: line 2: nvm: command not found如果找不到nvm,我什至不必想
nvm ls-remote 要么
nvm install ...我安装了Ubuntu 14.04,Bash是我的shell。