获取“错误:无法修改Shell配置文件:拒绝许可”使用推荐命令安装Rusup

发布于 2025-01-23 15:56:24 字数 547 浏览 2 评论 0原文

我尝试使用以下命令安装生锈,该命令由 https://rustup.rs/ for Unixes:for Unixes:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

但是 但是,我正在使用错误

error: could not amend shell profile: '/Users/XXXX/.bash_profile'
       could not write rcfile file: '/Users/XXXX/.bash_profile'
       Permission denied (os error 13)

,我正在使用zsh不是bash

I tried installing Rust using the below command, which is recommended by https://rustup.rs/ for Unixes:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

but getting an error

error: could not amend shell profile: '/Users/XXXX/.bash_profile'
       could not write rcfile file: '/Users/XXXX/.bash_profile'
       Permission denied (os error 13)

However, I am using zsh not bash.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最冷一天 2025-01-30 15:56:24

您的主目录似乎不是可以崩溃的安装程序的可编辑。

在a 。附加-s - -y -no-modify-path bash :

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
bash -s -- -y --no-modify-path

另外,您可以将写入权限授予无法编辑或运行的路径此命令带有sudo

Your home directory seems to not be editable which crashes the installer.

There seems to be a fix for this discussed in a rustup repo issue. Append -s -- -y --no-modify-path to bash:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
bash -s -- -y --no-modify-path

Alternatively, you could give write permission to the path that couldn't be edited, or run this command with sudo.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文