python - 尝试在 mac osx 上安装 geos 3.3.8 时出错

标签 python macos matplotlib-basemap geos

我正在尝试安装 basemap ,以便我可以通过 python 修改 map ,但我无法正确加载 GEOS( basemap 的先决条件)。我运行 ./configure,但是当我执行“sudo make; make install”时,我收到以下错误输出:

ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [libgeos.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
Making install in include
Making install in geos
Making install in algorithm
Making install in locate
make[6]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/include/geos/algorithm/locate" || ../../../.././install-sh -c -d           "/usr/local/include/geos/algorithm/locate"
 /usr/bin/install -c -m 644 IndexedPointInAreaLocator.h PointOnGeometryLocator.h     SimplePointInAreaLocator.h '/usr/local/include/geos/algorithm/locate'
install: /usr/local/include/geos/algorithm/locate/IndexedPointInAreaLocator.h: Permission      denied
make[6]: *** [install-geosHEADERS] Error 71
make[5]: *** [install-am] Error 2
make[4]: *** [install-recursive] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

我尝试更新我的 XCode 终端命令、重新下载软件包并更新其他所有内容。关于如何安装它有什么想法吗?

抱歉,如果这是一个简单的修复;刚接触Python...

最佳答案

关键错误消息是:

安装:/usr/local/include/geos/algorithm/locate/IndexedPointInAreaLocator.h:权限被拒绝

默认情况下,在 OS X(以及大多数其他 Unix-y 系统)上,您需要管理员权限才能在 /usr/local 及其子目录中创建文件。尝试使用 sudo 运行 make install:

sudo make install

关于python - 尝试在 mac osx 上安装 geos 3.3.8 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17124983/

相关文章:

Python Matplotlib basemap - 如何设置缩放级别

cocoa - 如何使用 Cocoa 检测文件是否已重命名?

iphone - 以编程方式从 PC/Mac 读取 iPhone 文件

python - 如何删除 numpy 列表文件之间的空格行?

python - 运行时错误 : Working outside of application context. Flask - 邮件

C++ 指针使用 Visual Studio 更改地址,而不是使用 OsX 中的 Xcode 或 Linux 中的 gcc

python - 使用 Python (matplotlib) 的自定义标记

python - 安装 Shapely 时找不到 OSError geos_c

python - 如何设置浏览器为 webbrowser 打开 localhost?

python - celery worker 没有消耗足够的任务