免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: graflong
打印 上一主题 下一主题

急啊!我在安装MySQL-python-1.2.0时,遇到以下问题 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-04-11 19:22 |显示全部楼层
Just This:
[options]
embedded = False
threadsafe = True
static = False

# Use the compiler section to add additional options for the extension build.
# In particular, if your platform does not support mysql_config (like
# Windows), you will have to set most of these. Note that each entry is split
# into a list so that each line is one item.

[compiler]
mysql_root: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit
library_dirs: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit/lib
include_dirs: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit/include
libraries: mysqlclient
# zlib
# msvcrt
# libcmt
# wsock32
# advapi32
#extra_compile_args:
#extra_objects:

论坛徽章:
0
12 [报告]
发表于 2006-04-11 19:34 |显示全部楼层
I'm sorry ,the same Error!why?

论坛徽章:
0
13 [报告]
发表于 2006-04-11 19:38 |显示全部楼层
if I modify threadsafe =False ,the error is :
"root@TNC1 # python site.cfg build
  File "site.cfg", line 18
    mysql_root: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit
              ^
SyntaxError: invalid syntax
root@TNC1 # more site.cfg
# Options:
#
# embedded: link against the embedded server library
# threadsafe: use the threadsafe client
# static: link against a static library (probably required for embedded)

[options]
embedded = False
threadsafe = False
static = False

# Use the compiler section to add additional options for the extension build.
# In particular, if your platform does not support mysql_config (like
# Windows), you will have to set most of these. Note that each entry is split
# into a list so that each line is one item.

[compiler]
mysql_root: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit
library_dirs: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit/lib
include_dirs: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit/include
libraries: mysqlclient
# zlib"

论坛徽章:
0
14 [报告]
发表于 2006-04-11 19:43 |显示全部楼层
I change the "mysql_root: /usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit" into "mysql_root: /usr/local/mysql" ,but the error is same as before

论坛徽章:
0
15 [报告]
发表于 2006-04-11 20:10 |显示全部楼层
还是不行
root@TNC1 # python setup.py build
/usr/local/ASpy24/lib/python2.4/distutils/extension.py:133: UserWarning: Unknown
Extension options: 'mysql_root'
  warnings.warn(msg)
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.8-sun4u-2.4/MySQLdb
running build_ext
building '_mysql' extension
cc -DNDEBUG -O -xcode=pic32 -I/usr/local/mysql-standard-5.0.19-solaris8-sparc-64
bit/include -I/usr/local/ASpy24/include/python2.4 -c _mysql.c -o build/temp.sola
ris-2.8-sun4u-2.4/_mysql.o -xO3 -mt -D_FORTEC_ -xarch=v9 -Dversion_info="(1,2,1,
'final',2)" -D__version__="1.2.1_p2"
cc: warning: `-x arch=v9' after last input file has no effect
cc: language code=pic32 not recognized
cc: _mysql.c: linker input file unused because linking not done
cc -G build/temp.solaris-2.8-sun4u-2.4/_mysql.o -L/usr/local/mysql-standard-5.0.
19-solaris8-sparc-64bit/lib -lmysqlclient -o build/lib.solaris-2.8-sun4u-2.4/_my
sql.so
cc: build/temp.solaris-2.8-sun4u-2.4/_mysql.o: No such file or directory
error: command 'cc' failed with exit status 1

论坛徽章:
0
16 [报告]
发表于 2006-04-12 10:09 |显示全部楼层
大虾,近来帮帮忙啊!

论坛徽章:
0
17 [报告]
发表于 2006-04-12 11:03 |显示全部楼层
root@TNC1 # python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.8-sun4u-2.4/MySQLdb
running build_ext
building '_mysql' extension
cc -DNDEBUG -O -xcode=pic32 -I/usr/local/mysql-standard-5.0.19-solaris8-sparc-64bit/include -I/usr/local/ASpy24/include/python2.4 -c _mysql.c -o build/temp.solaris-2.8-sun4u-2.4/_mysql.o -xO3 -mt -D_FORTEC_ -xarch=v9 -Dversion_info="(1,2,1,'final',2)" -D__version__="1.2.1_p2"
/usr/ucb/cc:  language optional software package not installed
error: command 'cc' failed with exit status 1

关键是最后两句,请大虾指点一二。

论坛徽章:
0
18 [报告]
发表于 2006-04-12 12:38 |显示全部楼层
哦,好的!

论坛徽章:
0
19 [报告]
发表于 2006-04-12 20:56 |显示全部楼层

回复 25楼 webstroller 的帖子

用的就是GCC
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP