繁体   English   中英

.bash_profile 权限被拒绝

[英].bash_profile permission denied

我正在尝试使用 github 发布我的第一个项目,但我无法在本地测试构建。

我按照这里的步骤操作: https://jekyllrb.com/docs/installation/macos/

我被困在以下命令行运行中:

echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.bash_profile
echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.bash_profile
echo "chruby ruby-3.1.2" >> ~/.bash_profile # run 'chruby' to see actual version

每次我运行第一个时,我都会收到以下错误:

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

这对我来说都是全新的,老实说,当涉及到控制台时,我不知道自己在做什么。 我在 MacOS Monetory 上,我的 shell 是 bash。 任何帮助将非常感激!

某些东西已损坏或更改了您的.bash_profile脚本的所有权。

打开 Terminal.app 并执行以下操作:

  • mv -f ~/.bash_profile ~/.bash_profile
  • cp ~/.bash_profile.old ~/.bash_profile

这些命令显示不会产生错误。

现在尝试将您的脚本重新运行到 append 到.bash_profile

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM