gpt4 book ai didi

python-2.7 - 无法在/usr/lib/Python2.7 中创建站点包,它显示 "Operation not permitted"

转载 作者:行者123 更新时间:2023-12-04 17:33:38 26 4
gpt4 key购买 nike

我试图在我的系统 (macOs 10.14.5) 上安装 thrift(0.11.0)。为此我下载并提取了 tar 文件。然后我运行了以下命令:

./bootstrap.sh
./configure
make
make install

但是 ma​​ke install 抛出了以下错误:

error: could not create '/usr/lib/python2.7/site-packages': Operation not permitted

然后我也尝试在/usr/lib/python2.7 中手动创建站点包,但错误消息仍然相同。我也在运行 ma​​ke install 时尝试了 sudo 但它没有太大帮助。

最佳答案

1.打开thrift的子文件夹lib/py/,修改Makefile如下:

PY_PREFIX=/usr

改为

PY_PREFIX =/Users/amy/python

2.sudo make install

关于python-2.7 - 无法在/usr/lib/Python2.7 中创建站点包,它显示 "Operation not permitted",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57604719/

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