![](/img/trans.png)
[英]Why did I get “Requirements installation failed with status: 1” error with RVM?
[英]Why do I get a PATH error when sourcing RVM?
當啟動終端或使用RVM時,我一直收到此錯誤。 我嘗試刪除PATH,但仍然一無所獲。
cat: /Users/admin/.rvm/VERSION: No such file or directory
Warning! PATH is not properly set up, '/Users/admin/.rvm/gems/ruby-2.0.0-p247/bin' is not available,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p247'.
-bash: /Users/admin/.rvm/scripts/base: No such file or directory
-bash: /Users/admin/.rvm/scripts/help: No such file or directory
我的〜/ .bash_profile,為簡潔起見進行了編輯:
source ~/.rvm/scripts/rvm
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
您需要在任何PATH自定義之后獲取 RVM,或者只是破壞RVM設置的值。 當前,您正在采購RVM,然后覆蓋它創建的修改后的PATH。 根據您的啟動文件配置,以下行應放在~/.bashrc
, ~/.profile
或~/.bash_profile
最后一行:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
除非您知道自己在做什么,否則不要在采購RVM后修改PATH。 即使這樣,您仍需要確保將新PATH附加或添加到當前PATH之前。 例如,您可以在采購RVM之后放置以下內容:
PATH=$HOME/foo/bar:$PATH
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.