【问题标题】:~/.bash_profile Permissions denied [closed]~/.bash_profile 权限被拒绝 [关闭]
【发布时间】:2015-11-08 18:42:21
【问题描述】:

我正在尝试将这些行 export PATH=~/.rbenv/bin:$PATH eval "$(rbenv init -)" 添加到我的 ~/.bash_profile 但是当我输入 ~/.bash_profile 时它会给我这个错误

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

我尝试按照基本 Github 结帐 (https://github.com/sstephenson/rbenv/blob/master/README.md#basic-github-checkout) 上的说明进行操作,但我得到了同样的错误。

仅供参考,我对 ruby​​ on rails 还是一个人编程非常陌生。

【问题讨论】:

  • 你能运行ls -la ~/.bash_profile并将输出放在这里吗?
  • 嘿@JGutierrezC,我有同样的问题,这里是你问的上述命令的输出:'-rw-r--r-- 1 root root 132 Oct 7 22:10 /home/ kashif/.bash_profile' 。我现在该怎么办?

标签: bash profile


【解决方案1】:

.bash_profile 不可执行,这就是您收到错误的原因。要在更改后重新加载它,请使用 bash 的 source 命令:

source ~/.bash_profile

或等效别名:

. ~/.bash_profile

【讨论】:

    【解决方案2】:

    当你输入 ~/.bash_profile 时,你正在执行它。你需要用文本编辑器打开这个文件并粘贴export PATH.....

    【讨论】:

      猜你喜欢
      • 2014-06-23
      • 1970-01-01
      • 2015-03-19
      • 2015-12-02
      • 2012-07-21
      • 1970-01-01
      • 2016-06-13
      • 2015-08-05
      • 2015-07-15
      相关资源
      最近更新 更多