您的位置:首页 > 运维架构 > Shell

shell_session_update: command not found

2016-08-10 20:21 791 查看
最近在mac上安装pod的时候,提示ruby的版本必须>=ruby-2.2.2,所以只能先使用rvm升级ruby的版本。所以得先安装rvm,过程如下:

$ curl -L get.rvm.io | bash -s stable//等待一段时间下载文件
$ source ~/.bashrc
$ source ~/.bash_profile




通过rvm -v查看是否安装成功,发现显示如下:

rvm 1.27.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
/Users/tgs/.rvm/bin/rvm: line 66: shell_session_update: command not found


虽然rvm是安装成功了,但是提示了一个错误:/Users/tgs/.rvm/bin/rvm: line 66:shell_session_update: command not found。由于刚开始忽略了这个错误,导致更新ruby的时候,一直在安装的过程中报shell_session_update:
command not found而升级失败。后来才发现是由于安装rvm的命令比较早期,从而导致在下载的过程中缺少了部分文件,在使用了新的命令时,安装成功。命令如下:

$ curl -sSL https://get.rvm.io | bash
$ source ~/.bashrc
$ source ~/.bash_profile
解决方案原文出处:http://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f

附带ruby更新命令:

#查看当前ruby版本
$ ruby -v
ruby 2.0.0[-p648]
#列出已知的ruby版本
$ rvm list known
#安装 ruby-2.3.0
$ rvm reinstall ruby-2.3.0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐