gpt4 book ai didi

python - 错误 : Failure while executing; `cp -pR/private/tmp/d20221129-9397-882a6m/ca-certificates/./usr/local/Cellar/ca-certificates` exited with 1

转载 作者:行者123 更新时间:2023-12-05 04:19:57 25 4
gpt4 key购买 nike

当我用brew安装python时,它显示错误:

cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11: unable to copy ACL to /usr/local/Cellar/ca-certificates/./2022-10-11: Permission denied
cp: utimensat: /usr/local/Cellar/ca-certificates/.: Permission denied
Error: Failure while executing; `cp -pR /private/tmp/d20221129-9397-882a6m/ca-certificates/. /usr/local/Cellar/ca-certificates` exited with 1. Here's the output:
cp: /usr/local/Cellar/ca-certificates/./2022-10-11: Permission denied
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11: unable to copy extended attributes to /usr/local/Cellar/ca-certificates/./2022-10-11: Permission denied
cp: /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11/.brew: unable to copy extended attributes to /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: /usr/local/Cellar/ca-certificates/./2022-10-11/.brew/ca-certificates.rb: No such file or directory
cp: utimensat: /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: chown: /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: chmod: /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: chflags: /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11/.brew: unable to copy ACL to /usr/local/Cellar/ca-certificates/./2022-10-11/.brew: No such file or directory
cp: /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11/share: unable to copy extended attributes to /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11/share/ca-certificates: unable to copy extended attributes to /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates/cacert.pem: No such file or directory
cp: utimensat: /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: chown: /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: chmod: /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: chflags: /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11/share/ca-certificates: unable to copy ACL to /usr/local/Cellar/ca-certificates/./2022-10-11/share/ca-certificates: No such file or directory
cp: utimensat: /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: chown: /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: chmod: /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: chflags: /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11/share: unable to copy ACL to /usr/local/Cellar/ca-certificates/./2022-10-11/share: No such file or directory
cp: utimensat: /usr/local/Cellar/ca-certificates/./2022-10-11: No such file or directory
cp: chown: /usr/local/Cellar/ca-certificates/./2022-10-11: No such file or directory
cp: chmod: /usr/local/Cellar/ca-certificates/./2022-10-11: No such file or directory
cp: chflags: /usr/local/Cellar/ca-certificates/./2022-10-11: No such file or directory
cp: /private/tmp/d20221129-9397-882a6m/ca-certificates/./2022-10-11: unable to copy ACL to /usr/local/Cellar/ca-certificates/./2022-10-11: Permission denied
cp: utimensat: /usr/local/Cellar/ca-certificates/.: Permission denied

如何修复它并使用 brew 安装 python?在此之前,我用 brew 安装了 node 和 yarn。我试过卸载它并重新安装 brew,但它不起作用。谢谢!

最佳答案

我遇到了同样的问题,并设法通过以下方式解决了它:

我看到升级脚本试图从/private/tmp/d20221130-21318-e53mkn/ca-certificates/./2022-10-11/usr/local/Cellar/ca-certificates/./2022-10- 11 我得到了一个 Permission denied 意思是 - 我(当前的 mac 用户)无法在那里编辑/创建文件。

所以我去了 /usr/local/Cellar/ 并看到我的用户不是文件夹 ca-certificates 和其他几个文件夹的所有者。所以我只是像这样改变了onwer:

cd /usr/local/Cellar/

sudo chown -R REPLACE_WITH_YOUR_USERNAME:admin *

这解决了我的问题。之后,一个简单的 brew upgrde 升级了我所有的包。

希望对您有所帮助!

关于python - 错误 : Failure while executing; `cp -pR/private/tmp/d20221129-9397-882a6m/ca-certificates/./usr/local/Cellar/ca-certificates` exited with 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74608872/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com