首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >.bash_profile权限被拒绝

.bash_profile权限被拒绝
EN

Stack Overflow用户
提问于 2022-08-11 05:59:42
回答 1查看 163关注 0票数 0

我正试图在github上发布我的首批项目之一,但我在本地测试构建时遇到了困难。

我遵循以下步骤:https://jekyllrb.com/docs/installation/macos/

我被困在下面的命令行运行中:

代码语言:javascript
复制
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: /User/account/.-bash_profile:权限被拒绝

这对我来说是非常新的,老实说,我不知道我在做什么,当涉及到控制台的时候。我在MacOS Monetory,我的壳是bash。任何帮助都是非常感谢的!

EN

回答 1

Stack Overflow用户

发布于 2022-09-19 18:21:47

某些东西已经损坏或更改了所有权,从而使.bash_profile脚本根化。

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

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

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

现在,尝试重新运行您的脚本以附加到.bash_profile

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73315913

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档