RVM安装和权限问题 [英] RVM Installation and permission issue

查看:255
本文介绍了RVM安装和权限问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过教程及其后续版本来安装RVM步骤4 echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" ' >> ~/.bash_profile我遇到了这个错误

I install RVM by this tutorial and on the step number 4 echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" ' >> ~/.bash_profile I got this one error

-bash:/Users/my_name/.bash_profile:权限被拒绝

-bash: /Users/my_name/.bash_profile: Permission denied

我尝试使用 sudo 运行它,但仍然出现此错误

I tried it run with the sudo, but I am still getting this error

推荐答案

如果您不想进行全局安装,请不要在rvm安装中使用sudo.

Don't use sudo for rvm installs if you don't want a global install.

要修复此类权限错误,请检查该文件的当前权限:

To fix a permission error like this, check the current permissions on that file:

ls -la ~/.bash_profile

它应该由my_name用户拥有,并且具有读写访问权限.如果不是,请像这样更改所有权:

It should be owned by the my_name user and have read and write access. If it's not, change the ownership like so:

sudo chown my_name:my_name /Users/my_name/.bash_profile

以及任何潜在的权限错误

and any potential permission errors with

chmod 600 /Users/my_name/.bash_profile

如果您曾经使用root来安装用户的rvm,请按以下步骤修复它:

If you ever used root to install your user's rvm, fix it like this:

sudo chown -R my_name:my_name /Users/my_name/.rvm

这篇关于RVM安装和权限问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆