Python论坛  - 讨论区

标题:Re: [python-chinese] 编译 MySQL-python-1.2.0 时 出错

2005年04月12日 星期二 13:33

hutuworm hutuworm at gmail.com
Tue Apr 12 13:33:37 HKT 2005

貌似math库找不到
检查libm.so/libm.a是否存在?
/etc/ld.so.conf是否包含/usr/lib/?


On Apr 11, 2005 4:27 PM, lilanzhu <lilz at hichina.com> wrote:
> 
> python-chinese,您好!
> 
> 各位好,本人python刚刚入门,现在需要安装一个mysql的模块(MySQL-python-1.2.0),编译时出现如下错误,请问该怎么解决?
> 
> # python setup.py build
> running build
> running build_py
> not copying _mysql_exceptions.py (output up-to-date)
> not copying MySQLdb/__init__.py (output up-to-date)
> not copying MySQLdb/converters.py (output up-to-date)
> not copying MySQLdb/connections.py (output up-to-date)
> not copying MySQLdb/cursors.py (output up-to-date)
> not copying MySQLdb/sets.py (output up-to-date)
> not copying MySQLdb/times.py (output up-to-date)
> not copying MySQLdb/stringtimes.py (output up-to-date)
> not copying MySQLdb/mxdatetimes.py (output up-to-date)
> not copying MySQLdb/pytimes.py (output up-to-date)
> not copying MySQLdb/constants/__init__.py (output up-to-date)
> not copying MySQLdb/constants/CR.py (output up-to-date)
> not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
> not copying MySQLdb/constants/ER.py (output up-to-date)
> not copying MySQLdb/constants/FLAG.py (output up-to-date)
> not copying MySQLdb/constants/REFRESH.py (output up-to-date)
> not copying MySQLdb/constants/CLIENT.py (output up-to-date)
> running build_ext
> building '_mysql' extension
> skipping _mysql.c (build/temp.linux-i686-2.2/_mysql.o up-to-date)
> gcc -shared build/temp.linux-i686-2.2/_mysql.o -lmysqlclient -lz -lcrypt 
> -lnsl -lm] -lmysqlclient_r -o build/lib.linux-i686-2.2/_mysql.so
> /usr/bin/ld: cannot find -lm]
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
> 
> 操作系统:redhat7.3 ,已经安装了所以gcc开发包,如下:
> glibc-2.2.5-34
> glib2-2.0.1-2
> glibc-kernheaders-2.4-7.14
> glibc-common-2.2.5-34
> glib-1.2.10-5
> glibc-devel-2.2.5-34
> gcc-2.96-110
> gcc-c++-2.96-110
> gcc-g77-2.96-110
> 
> 问题紧急,请高手帮助,谢谢
> 
>> 礼!
> 
> 
> lilanzhu
> lilz at hichina.com
> 2005-04-11
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
> 
> 
> 


-- 
In doG We Trust
http://www.hutuworm.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050412/54fe898f/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年04月12日 星期二 13:57

lilanzhu lilz at hichina.com
Tue Apr 12 13:57:17 HKT 2005

hutuworm,您好! 

  谢谢你的提醒!

       我已经搞定了,最后发现是错程提示不准确, libm.so确实存在,而且好用。

      是因为我少定义了一个环境变量导致的,我是从README里看到的,必须定义: mysqlclient=mysqlclient ,否则就会出这个错

======== 2005-04-12 13:33:00 您在来信中写道: ========

貌似math库找不到
检查libm.so/libm.a是否存在?
/etc/ld.so.conf是否包含/usr/lib/?



On Apr 11, 2005 4:27 PM, lilanzhu <lilz at hichina.com> wrote: 
python-chinese,您好!

各位好,本人python刚刚入门,现在需要安装一个mysql的模块(MySQL-python-1.2.0),编译时出现如下错误,请问该怎么解决?

# python setup.py build
running build
running build_py
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
not copying MySQLdb/sets.py (output up-to-date)
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/stringtimes.py (output up-to-date)
not copying MySQLdb/mxdatetimes.py (output up-to-date)
not copying MySQLdb/pytimes.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
building '_mysql' extension
skipping _mysql.c (build/temp.linux-i686-2.2/_mysql.o up-to-date)
gcc -shared build/temp.linux-i686-2.2/_mysql.o -lmysqlclient -lz -lcrypt -lnsl -lm] -lmysqlclient_r -o build/lib.linux-i686-2.2/_mysql.so
/usr/bin/ld: cannot find -lm]
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

操作系统:redhat7.3 ,已经安装了所以gcc开发包,如下:
glibc-2.2.5-34
glib2-2.0.1-2
glibc-kernheaders-2.4-7.14
glibc-common-2.2.5-34
glib-1.2.10-5
glibc-devel-2.2.5-34
gcc-2.96-110
gcc-c++-2.96-110
gcc-g77-2.96-110

问题紧急,请高手帮助,谢谢

致
礼!


lilanzhu
lilz at hichina.com
2005-04-11

_______________________________________________
python-chinese list
python-chinese at lists.python.cn
http://python.cn/mailman/listinfo/python-chinese






-- 
In doG We Trust
http://www.hutuworm.org 

= = = = = = = = = = = = = = = = = = = = = = 
        致
礼!

              lilanzhu
              lilz at hichina.com
                 2005-04-12
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050412/cf60ecbc/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号