无法在osx上安装python berkeleydb access

2024-07-03 06:20:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我在我的mac电脑上安装了Python2.6(它是2.5附带的,我在使用2.6的时候疯了),所有的东西都安装在/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/上。现在我想安装python BerkeleyDB模块,但在构建过程中出现语法错误:

creating build/temp.macosx-10.3-fat-2.6/extsrc
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -DPYBSDDB_STANDALONE=1 -I~/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c extsrc/_bsddb.c -o build/temp.macosx-10.3-fat-2.6/extsrc/_bsddb.o
extsrc/_bsddb.c:232: error: syntax error before 'DB_ENV'
extsrc/_bsddb.c:232: warning: no semicolon at end of struct or union
extsrc/_bsddb.c:239: error: syntax error before '}' token
extsrc/_bsddb.c:239: warning: data definition has no type or storage class
extsrc/_bsddb.c:245: error: syntax error before 'DBEnvObject'
extsrc/_bsddb.c:245: warning: no semicolon at end of struct or union
extsrc/_bsddb.c:258: error: syntax error before '}' token
extsrc/_bsddb.c:258: warning: data definition has no type or storage class
<and so on>
extsrc/_bsddb.c:5915: error: 'DB_OLD_VERSION' undeclared (first use in this function)
extsrc/_bsddb.c:5916: error: 'DB_RUNRECOVERY' undeclared (first use in this function)
extsrc/_bsddb.c:5917: error: 'DB_VERIFY_BAD' undeclared (first use in this function)
lipo: can't figure out the architecture type of: /var/folders/Ye/YeXcn-oIE7ybm-TS4yB8c++++TQ/-Tmp-//cclJF2Xy.out

谷歌帮不上忙。在


Tags: orofnodbincludeusetypeerror
3条回答

来自python.org的标准Python2.6 OSX安装程序包括bsddb。为什么要自己动手?在

尝试:

轻松安装bsddb3

使用fink或macports重新安装python,然后从其中任何一个获得berkley包,这可能会节省大量时间。在

相关问题 更多 >