我正在尝试安装Fabric,这需要pycrypto。在构建pycrypto期间,我总是收到“Broken Pipe”错误。我不知道从哪里开始解决这个问题。
我正在运行Mac OS X Snow Leopard 10.6.6,安装了所有更新; Python 2.6.1; GCC 4.2; XCode 4(如果更新了GCC)
确切的错误是:
$ sudo python setup.py build
Password:
running build
running build_py
running build_ext
warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/MD2.c -o build/temp.macosx-10.6-universal-2.6/src/MD2.o
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
src/MD2.c:134: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/tmp//ccfADoXD.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
1
好吧,问题是它正在尝试构建一个PPC二进制文件。在gcc行中,它有“-arch ppc”,这将导致它。不知道怎么解决它。
—
Tony Arkles 2011年