2
當我嘗試安裝NVM和測試,它的安裝在我的遊民外殼配置腳本,使用:爲什麼nvm命令是以root身份安裝的,在vagrant bootstrap.sh中也沒有找到?
sudo wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
source ~/.bashrc
nvm
我得到:
==> default: => Downloading nvm as script to '/root/.nvm'
==> default: => Appending source string to /root/.bashrc
==> default: => You can now install Node.js by running `nvm install`
==> default: /tmp/vagrant-shell: line 7: nvm: command not found
首先,我不希望它安裝的根,我想將它安裝爲/ home/vagrant中的流浪用戶以避免許可問題。
第二個爲什麼當我運行source .bashrc
時找不到命令,如在這裏的nvm安裝說明https://github.com/creationix/nvm中指定的那樣?
我有一個我現在添加的解決方案。