【发布时间】:2018-05-12 06:32:14
【问题描述】:
我正在尝试在我的 Elastic Beanstalk 实例上安装 nvm,因为我们的 rails 应用程序需要节点 6.9.5,目前该实例上存在节点 4。我正在运行命令
01_node_install:
command: "sudo yum install make glibc-devel gcc patch openssl-devel c++"
02_node_install:
command: "curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh"
03_node_install:
command: "source ~/.bash_profile"
04_node_install:
command: "nvm install 6.9.5"
05_node_install:
command: "nvm alias default 6.9.5"
我收到一个错误
=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
=> Create one of them and run this script again
OR
=> Append the following lines to the correct file yourself:
export NVM_DIR="/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
=> Close and reopen your terminal to start using nvm
对我来说奇怪的是它说文件 ~/.bash_profile 不存在,但我可以 ssh 进入实例并查看它。我试图将这些行回显到文件中,但得到了类似的错误。
任何帮助将不胜感激!
【问题讨论】:
-
为什么它被标记为 Rails ?
-
正因为主应用是rails应用,我就去掉标签
标签: node.js amazon-web-services amazon-elastic-beanstalk