rbenv 安装权限被拒绝 [英] rbenv installation permission denied
问题描述
大家好,我正在尝试建立一个开发环境,我一直在通过以下教程学习;教程链接
Hi all I'm trying to set up a dev environment and I've been following a tutorial via; Link to tutorial
我做得不是很好,除了最基本的版本控制内容之外,我对终端命令没有真正的经验.我遵循了第一个链接,并在尝试运行时
I'm not doing very well and have no real experience of terminal commands other than the most basic version control stuff. I followed the first link and when trying to run
source ~/.bash_profile
我得到了错误;mkdir:/usr/local/rbenv/shims: 权限被拒绝mkdir:/usr/local/rbenv/versions: 权限被拒绝
现在每次加载终端都会出现错误.
Now every time I load terminal the error appears.
bash_profile 的内容;
Contents of bash_profile;
export PATH=/usr/local/rbenv/bin:$PATH
export RBENV_ROOT=/usr/local/rbenv
eval "$(rbenv init -)"
任何指导将不胜感激
推荐答案
看起来 rbenv 设置在您的 .bash_profile
中放置了一行 shell 脚本,试图创建该目录.您可以授予自己在 /usr/local/rbenv
或 sudo mkdir/directories/that/need/to/be/created
中创建目录的权限.>
It looks like the rbenv setup puts a line of shell scripting in your .bash_profile
that attempts to create that directory. You could either give yourself permissions to create directories in /usr/local/rbenv
, or sudo mkdir /directories/that/need/to/be/created
once.
sudo mkdir -p /usr/local/rbenv/shims
sudo mkdir -p /usr/local/rbenv/versions
这篇关于rbenv 安装权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!