2011-05-04 2 views
0

저는 svn과 python을 처음 사용했지만 실제로는 xattr의 최신 버전을 사용하고 싶습니다. OS.osx python setup.py는 xattr-0.6.1 응용 프로그램을 설치하지 않습니다.

OSX 10.5.6에서 xattr-0.6.1 설치에 문제가 있습니다. 터미널에서 로컬 컴퓨터에서

:

: ~ /에서 xattr-0.6.1/

$ cd xattr-0.6.1/ 
$ sudo python setup.py install 

--------------------------------------------------------------------------- 
This script requires setuptools version 0.6c11 to run (even to display 
help). I will attempt to download it for you (from 
http://pypi.python.org/packages/2.5/s/setuptools/), but 
you may need to enable firewall access for this script first. 
I will start the download in 15 seconds. 

(Note: if this machine does not have network access, please obtain the file 

    http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg 

and place it in this directory before rerunning this script.) 
--------------------------------------------------------------------------- 
Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg 
running install 
running bdist_egg 
running egg_info 
creating xattr.egg-info 
writing xattr.egg-info/PKG-INFO 
writing top-level names to xattr.egg-info/top_level.txt 
writing dependency_links to xattr.egg-info/dependency_links.txt 
writing entry points to xattr.egg-info/entry_points.txt 
writing manifest file 'xattr.egg-info/SOURCES.txt' 
writing manifest file 'xattr.egg-info/SOURCES.txt' 
installing library code to build/bdist.macosx-10.5-i386/egg 
running install_lib 
running build_py 
creating build 
creating build/lib.macosx-10.5-i386-2.5 
creating build/lib.macosx-10.5-i386-2.5/xattr 
copying xattr/__init__.py -> build/lib.macosx-10.5-i386-2.5/xattr 
copying xattr/constants.py -> build/lib.macosx-10.5-i386-2.5/xattr 
copying xattr/tool.py -> build/lib.macosx-10.5-i386-2.5/xattr 
running build_ext 
building 'xattr._xattr' extension 
creating build/temp.macosx-10.5-i386-2.5 
creating build/temp.macosx-10.5-i386-2.5/xattr 
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c xattr/_xattr.c -o build/temp.macosx-10.5-i386-2.5/xattr/_xattr.o 
unable to execute gcc: No such file or directory 
error: command 'gcc' failed with exit status 1 

에서

$ svn co http://svn.red-bean.com/bob/xattr/releases/xattr-0.6.1/ 

파일 다운로드 및 배치는 파이썬의 버전을 확인하려면

$ python -V 
Python 2.5.1 

파이썬 업데이트를 설치 한 것으로 보입니다.

나는에서 xattr 다시 설치 실행하려고 :

$ sudo python setup.py install 
running install 
running bdist_egg 
running egg_info 
writing xattr.egg-info/PKG-INFO 
writing top-level names to xattr.egg-info/top_level.txt 
writing dependency_links to xattr.egg-info/dependency_links.txt 
writing entry points to xattr.egg-info/entry_points.txt 
writing manifest file 'xattr.egg-info/SOURCES.txt' 
installing library code to build/bdist.macosx-10.5-i386/egg 
running install_lib 
running build_py 
running build_ext 
building 'xattr._xattr' extension 
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c xattr/_xattr.c -o build/temp.macosx-10.5-i386-2.5/xattr/_xattr.o 
unable to execute gcc: No such file or directory 
error: command 'gcc' failed with exit status 1 

내가 중요한 기본 요소 실종 또는 setup.py 구성, 그렇지 않으면 아마도 뭔가 내가 간과 할 수 있습니다에 문제가?

답변

1

C 파일을 컴파일해야하므로 gcc이 필요합니다. Mac 사용자는 XCode을 설치해야합니다. 업데이트 @jathanism에서 언급했듯이, Mac과 함께 제공되는 XCode 설치 DVD (대부분 3.2 버전)가 있어야합니다. 예를 들어

: 링크 구입해야 엑스 코드 4,하는 것입니다

atlas% which gcc 
/usr/bin/gcc 
atlas% gcc -v 
Target: i686-apple-darwin10 
.. 
Thread model: posix 
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) 
+0

. 시스템 버전에 적합한 XCode 버전은 설치 DVD의 "Optional Installs"디렉토리에 번들로 제공됩니다. – jathanism

+0

친절하게 감사합니다. @ samplebias, @ jathanism. 내 10.5 Leotard 업그레이드 디스크에는 gcc 4.0이 포함 된 Xcode 3.0이 있습니다. Xcode를 설치 한 후 setup.py를 실행할 수 있었고 이제 xattr의 업데이트 된 버전이 설치되었습니다. :) – timoto

+0

당신이 듣고 기뻐요! – samplebias

관련 문제