• 安装MySQLdb出现HAVE_WCSCOLL重定义问题的解决方法


    root@wodeyitian MySQL-python-1.2.3]# python setup.py install
    running install
    running bdist_egg
    running egg_info
    writing MySQL_python.egg-info/PKG-INFO
    writing top-level names to MySQL_python.egg-info/top_level.txt
    writing dependency_links to MySQL_python.egg-info/dependency_links.txt
    reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'MANIFEST'
    warning: no files found matching 'ChangeLog'
    warning: no files found matching 'GPL'
    writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
    installing library code to build/bdist.linux-x86_64/egg
    running install_lib
    running build_py
    copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
    running build_ext
    building '_mysql' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/usr/local/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
    在包含自 _mysql.c:36 的文件中:
    /usr/include/mysql/my_config.h:1062:1: 警告:“HAVE_WCSCOLL”重定义
    在包含自 /usr/local/include/python2.7/Python.h:8 的文件中,
                    从 pymemcompat.h:10,
                    从 _mysql.c:29:
    /usr/local/include/python2.7/pyconfig.h:887:1: 警告:这是先前定义的位置
    gcc -pthread -shared build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib64/mysql -L/usr/lib64 -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lssl -lcrypto -o build/lib.linux-x86_64-2.7/_mysql.so
    /usr/bin/ld: cannot find -lmysqlclient_r
    collect2: ld 返回 1
    error: command 'gcc' failed with exit status 1


    解决方式:
    yum install mysql-devel


  • 相关阅读:
    类加载机制的学习4___类加载的过程
    类加载机制的学习3___自定义的类加载器
    类加载机制的学习2_____双亲委派模型
    使用.NET读取exchange邮件
    SSMS错误:A connection was successfully established with the server, but then an error occurred during the login process
    收缩数据库 DBCC SHRINKFILE
    How to: Change Sales Rep/Team via Mass Update
    Microsoft.Office.Interop.Word.Document.Open returns null on Windows Server 2008 R2
    设置文件夹的权限
    NetSuite API
  • 原文地址:https://www.cnblogs.com/seasonsstory/p/3248553.html
Copyright © 2020-2023  润新知