未找到 _iconv 的 pyspatialite 符号

发布于 2024-10-28 12:51:27 字数 1092 浏览 4 评论 0原文

我正在尝试使用命令编译 pyspatialite 2.6.1

sudo python setup.py install

它编译成功,但生成的二进制文件缺少符号。当我从中导入 dbapi2 模块时,出现以下错误。

Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyspatialite import dbapi2 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/dbapi2.py", line 27, in <module>
    from pyspatialite._spatialite import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/_spatialite.so, 2): Symbol not found: _iconv
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/_spatialite.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/_spatialite.so

我该如何修复这个错误?

I am trying to compile pyspatialite 2.6.1 using the command

sudo python setup.py install

It compiles successfully but the resulting binary is missing a symbol. When I import the dbapi2 module from it I get the following error.

Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyspatialite import dbapi2 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/dbapi2.py", line 27, in <module>
    from pyspatialite._spatialite import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/_spatialite.so, 2): Symbol not found: _iconv
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/_spatialite.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspatialite/_spatialite.so

How do I fix this error?

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

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

发布评论

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

评论(1

最佳男配角 2024-11-04 12:51:27

我自己找到了答案。在 setup.py 中查找一行内容:

libraries = ['geos','geos_c','proj']

将“iconv”添加到该列表的末尾,使其看起来像这样:

libraries = ['geos','geos_c','proj','iconv']

I have found the answer on my own. In setup.py look for a line that says:

libraries = ['geos','geos_c','proj']

Add 'iconv' to the end of that list so that it looks like this:

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