0

尝试basemap-1.0.7在我的 MAC OS v10.7.3 上工作时,我目前收到以下错误:

error: C compiler cannot create executables

basemap-1.0.7.tar.gz这里下载,安装后,我按照 README 文件中的编号说明进行操作:

0) 安装必备的 python 模块 numpy 和 matplotlib。

1) 然后从 sourceforge 下载站点下载 basemap-XYZtar.gz(大约 100 mb),解压并 cd 到 basemap-XYZ

2) 安装 GEOS 库。如果您的系统上已经有它,只需将环境变量 GEOS_DIR 设置为指向 libgeos_c 和 geos_c.h 的位置(如果 libgeos_c 在 /usr/local/lib 中并且 geos_c.h 在 /usr/local/include 中,将 GEOS_DIR 设置为 /usr/local)。然后转到步骤 (3)。如果您没有它,您可以按照以下步骤从底图随附的源代码构建它:

> cd geos-3.3.3
> export GEOS_DIR=<where you want the libs and headers to go>
  A reasonable choice on a Unix-like system is /usr/local, or
  if you don't have permission to write there, your home directory.
> ./configure --prefix=$GEOS_DIR 
> make; make install

0) 完成:我使用anaconda, 所以两者import numpyimport matplotlibipython.

1) 完成:底图 1.0.7 已下载、解压,并且我已将工作目录更改为Downloads/basemap-1.0.7/

2) 问题:我没有GEOS 库。因此,我按照 README 文件中的说明进行操作:

cd geos-3.3.3 
export GEOS_DIR=/Users/ged/anaconda/lib/python2.7/site-packages/
./configure --prefix=$GEOS_DIR

随后的终端输出为:

checking build system type... i386-apple-darwin11.3.0
checking host system type... i386-apple-darwin11.3.0
checking target system type... i386-apple-darwin11.3.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no    
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/ged/Downloads/basemap-1.0.7/geos-3.3.3':
configure: error: C compiler cannot create executables
See `config.log' for more details

config.log文件放在这里有点长,所以我在这里提供

我曾尝试通过 GDAL 1.11 安装 GEOS,并且我也考虑升级到,xcode 4.6.3但老实说,我觉得我的深度不够。

我收到以下消息:

error: C compiler cannot create executables

您能否提供一些有关如何解决此问题的见解?提前致谢!

4

0 回答 0