简体   繁体   English

在Ubuntu 10.04上通过构建设置GDAL

[英]Setting up GDAL via buildout on Ubuntu 10.04

I'm trying to install GDAL-1.9.0 under Ubuntu 10.04 via buildout and unfortunately get a very strange error. 我正在尝试通过buildout在Ubuntu 10.04下安装GDAL-1.9.0,不幸的是得到一个非常奇怪的错误。

python setup.py build
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "setup.py", line 75, in <module>
    from distutils.command.build_ext import build_ext
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 13, in <module>
    from site import USER_BASE, USER_SITE
  File "/home/student/geoserv_new/geoportal2/trunk/parts/buildout/site.py", line 601, in <module>
    main()
  File "/home/student/geoserv_new/geoportal2/trunk/parts/buildout/site.py", line 583, in main
    known_paths = addusersitepackages(known_paths)
  File "/home/student/geoserv_new/geoportal2/trunk/parts/buildout/site.py", line 271, in addusersitepackages
    user_site = getusersitepackages()
  File "/home/student/geoserv_new/geoportal2/trunk/parts/buildout/site.py", line 246, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/home/student/geoserv_new/geoportal2/trunk/parts/buildout/site.py", line 235, in getuserbase
    from sysconfig import get_config_var
ImportError: No module named sysconfig
make[2]: *** [build] Error 1
make[2]: Leaving directory `/tmp/tmpY7oYvSbuildout-gdal/gdal-1.9.0/swig/python'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/tmp/tmpY7oYvSbuildout-gdal/gdal-1.9.0/swig'
make: *** [swig-modules] Error 2
gdal: cmmi failed: /tmp/tmpY7oYvSbuildout-gdal
While:
  Installing gdal.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.buildout-1.5.2-py2.7.egg/zc/buildout/buildout.py", line 1805, in main
    getattr(buildout, command)(args)
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.buildout-1.5.2-py2.7.egg/zc/buildout/buildout.py", line 584, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.buildout-1.5.2-py2.7.egg/zc/buildout/buildout.py", line 1297, in _call
    return f()
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.recipe.cmmi-1.3.5-py2.7.egg/zc/recipe/cmmi/__init__.py", line 113, in install
    self.build()
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.recipe.cmmi-1.3.5-py2.7.egg/zc/recipe/cmmi/__init__.py", line 196, in build
    self.cmmi(dest)
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.recipe.cmmi-1.3.5-py2.7.egg/zc/recipe/cmmi/__init__.py", line 222, in cmmi
    system("make")
  File "/home/student/geoserv_new/geoportal2/trunk/eggs/zc.recipe.cmmi-1.3.5-py2.7.egg/zc/recipe/cmmi/__init__.py", line 34, in system
    raise SystemError("Failed", c)
SystemError: ('Failed', 'make')

Here is my buildout.cfg part of gdal: 这是我的gdal的buildout.cfg部分:

[gdal]
recipe = zc.recipe.cmmi
url = http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz
extra_options = 
    --with-python
    --with-geos=${geos:location}/bin/geos-config

Even more strange that when I'm going to python2.7 shell and try import sysconfig. 更奇怪的是,当我要使用python2.7 shell并尝试导入sysconfig时。 Everything is working fine. 一切正常。 Any suggestion about this? 有什么建议吗?

Thanks, Sergey 谢谢,谢尔盖

You mention that you tested it in the 'python2.7' shell. 您提到您在“ python2.7” shell中对其进行了测试。

This: 这个:

File "/usr/lib/python2.6/distutils/command/build_ext.py",

Implies that buildout is running in python 2.6. 表示buildout正在python 2.6中运行。

Is sysconfig available in your python2.6 environment, or are you running buildout under the wrong version? sysconfig在您的python2.6环境中可用,还是在错误的版本下运行buildout?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM