免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1984 | 回复: 0
打印 上一主题 下一主题

mysql-python 安装问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-24 21:34 |只看该作者 |倒序浏览
MySQL-python 1.2.2安装过程中
报错:
sh: mysql_config: command not found
Traceback (most recent call last):
  File "setup.py", line 16, in ?
    metadata, options = get_config()
  File "/data/personal/henry/src/MySQL-python-1.2.2/setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "/data/personal/henry/src/MySQL-python-1.2.2/setup_posix.py", line 24, in mysql_config
    raise EnvironmentError, "%s not found" % mysql_config.path
EnvironmentError: mysql_config not found
检查发现
setup_posix.py 中函数get_config()
根据metadata.cfg 和site.cfg中的配置信息初始化编译选项。
site.cfg中mysql_cfg 没有设置。
正确配置site.cfg,成功编译及安装。
但是调用接口时,报错:
    File "build/bdist.linux-i686/egg/MySQLdb/__init__.py", line 19, in ?
  File "build/bdist.linux-i686/egg/_mysql.py", line 7, in ?
  File "build/bdist.linux-i686/egg/_mysql.py", line 6, in __bootstrap__
ImportError: /root/.python-eggs/MySQL_python-1.2.2-py2.4-linux-i686.egg-tmp/_mysql.so: undefined symbol: compress
检查链接选项,缺少 -lz,更正,一切顺利。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/34978/showart_308921.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP