python - 在 MacOS Catalina 上安装 GDAL 失败
问题描述
我正在尝试使用 brew 在我的 mac(Catalina 10.15.7)上安装 GDAL:
brew install gdal
但我遇到了一个我不明白的错误:
==> Pouring glib-2.66.4.catalina.bottle.tar.gz
cp: utimes: /usr/local/Cellar/glib/.: Operation not permitted
cp: chmod: /usr/local/Cellar/glib/.: Operation not permitted
Error: Failure while executing; `cp -pR /var/folders/7f/r7941wjd1fj2zlm79hwzlkcc0000gn/T/d20201223-26491-1643kjj/glib/. /usr/local/Cellar/glib` exited with 1. Here's the output:
cp: utimes: /usr/local/Cellar/glib/.: Operation not permitted
cp: chmod: /usr/local/Cellar/glib/.: Operation not permitted
Warning: Bottle installation failed: building from source.
==> Patching
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/<my_username>/Library/Caches/Homebrew/downloads/54f3f612bdfc9bfc09633176c7673816fe2a2188e470bf48d60d826bdf6bf21a--hardcoded-paths.diff
我还尝试了以下方法:
brew install --build-from-source gdal
但我遇到了完全相同的错误。我真的不明白问题出在哪里,尽管它似乎与权限有关。
我需要一些帮助来解决它。
解决方案
以下命令:
sudo chown -R $USER /usr/local
并重新安装,解决了问题。
推荐阅读
- javascript - React:当 props.location.state 未定义时,为什么我的登录页面中的引用变量不默认为“/”?
- azure-devops - 无法在 Azure 服务器中托管 Xero oAuth20 dll
- python - 了解 python 3.7 的异常内存使用情况
- microsoft-graph-api - 如何使用 Microsoft Graph API 更新计划者任务分配
- shell - 如何通过更少的管道来仔细查看 HOME、PATH USER?
- python - 我如何弄清楚为什么scrapy deltafetch仍然返回以前刮掉的项目
- streaming - 在 Asterisk 中播放在线广播电台作为音乐保留
- vector - 交换切片的元素(就地)
- java - 需要帮助制作 ArrayList
- android - 带有 Room 和 LiveData 的 MVVM