我想开始使用geodjango,为此我必须安装gdal。我使用的MacOS 10.8.3 为了与酿造这样做的GeoDjango内置文档中的建议,但我得到了以下错误:家庭酿造失败的“命令”gcc'失败,退出状态1“错误
$brew install gdal
==> Downloading http://download.osgeo.org/gdal/1.10.0/gdal-1.10.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/gdal-1.10.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/gdal/1.10.0 --mandir=/usr/local/Cellar/gdal/1.10.0/share/man --with-local=/usr/local/Cellar/gdal/1.10.0 --with-threads --with-libtool -
==> make
==> make install
==> /Users/Lucas/.virtualenvs/geotest/bin/python setup.py install --prefix=/usr/local/Cellar/gdal/1.10.0 --record=installed.txt --single-version-externally-managed
gcc-4.2 -bundle -undefined dynamic_lookup -g -L/usr/local/opt/sqlite/lib -lsqlite3 -I/usr/local/opt/sqlite/include -arch x86_64 build/temp.macosx-10.6-intel-2.7/extensions/gdalconst_wrap.o -L../../.libs -L../../ -L/private/tmp/gdal-gOux/gdal-1.10.0/lib -lgdal -o build/lib.macosx-10.6-intel-2.7/osgeo/_gdalconst.so
Your Xcode and or CLT are mis-configured. Try some or all of the following:
xcodebuild -license
sudo xcode-select -switch /path/to/Xcode.app
error: command 'gcc-4.2' failed with exit status 1
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
These open issues may also help:
https://github.com/mxcl/homebrew/issues/19845
https://github.com/mxcl/homebrew/issues/20373
https://github.com/mxcl/homebrew/pull/20457
诚如,我所做的:
xcodebuild -license
,并同意然后:
sudo xcode-select -switch /Applications/Xcode.app
我也检查了问题,但没有一个是有用的。
我已经安装了Xcode 4.6.3,并在过去酿造了许多其他配方,没有任何问题。
当我运行冲泡医生,我得到:
$brew doctor
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
/Applications/Postgres.app/Contents/MacOS/bin/gdal-config
/Applications/Postgres.app/Contents/MacOS/bin/geos-config
/Applications/Postgres.app/Contents/MacOS/bin/uuid-config
/Applications/Postgres.app/Contents/MacOS/bin/xml2-config
我不想在我的道路删除postgres.app,因为它是必要的postgres.app配置的CLI如下解释:http://postgresapp.com/documentation#toc_1
关于从库中的蟒蛇,我试图删除它们使用:
PATH=$(echo $PATH |sed 's/\/Library\/Frameworks\/Python.framework\/Versions\/2.7\/bin//')
的建议在这里:https://www.linuxquestions.org/questions/linux-newbie-8/how-to-remove-directory-from-%24path-483463/。但它并没有从路径中移除任何东西。
所以在这里我不打算安装@中......
也有这个问题。让我知道你是否找到解决方案/解决方法。 – sixthgear
当然,如果你先找到答案,请回答我的问题。 – ltbesh