无法在Mac OS X上安装pycurl - 获取错误1和2 [英] Cannot install pycurl on Mac OS X - get errors 1 and 2

查看:1042
本文介绍了无法在Mac OS X上安装pycurl - 获取错误1和2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Mac OSX 10.8.4上安装pycurl-7.19.0。

I am attempting to install pycurl-7.19.0 on my Mac OSX 10.8.4.

编译时得到的错误:

py setup.py install

结果:

Using curl-config (libcurl 7.24.0)
running install
running build
running build_py
running build_ext
building 'pycurl' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-      aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DHAVE_CURL_SSL=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/pycurl.c -o build/temp.macosx-10.8-intel-2.7/src/pycurl.o
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from src/pycurl.c:50:
In file included from /usr/local/include/curl/curl.h:35:
/usr/local/include/curl/curlrules.h:143:6: error: '__curl_rule_01__' declared as an array with a negative size
[CurlchkszEQ(long, CURL_SIZEOF_LONG)];
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                      ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/curl/curlrules.h:153:6: error: '__curl_rule_02__' declared as an array with a negative size
[CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                      ^~~~~~~~~~~~~~~~~~~~~~~
src/pycurl.c:85:4: warning: "libcurl was compiled with SSL support, but configure could not determine which " "library
  was used; thus no SSL crypto locking callbacks will be set, which may "    "cause random crashes on SSL requests"
  [-W#warnings]
#  warning \
^
1 warning and 2 errors generated.
error: command 'clang' failed with exit status 1

我目前有curl-7.32 .0安装并运行Python 2.7.2和GCC 4.2.1。

I currently have curl-7.32.0 installed and am running Python 2.7.2 and GCC 4.2.1.

推荐答案

这适用于我在OSX 10.9



This works for me on OSX 10.9

sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.19.0

这篇关于无法在Mac OS X上安装pycurl - 获取错误1和2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆