我想開始使用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