zoukankan      html  css  js  c++  java
  • 安装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


  • 相关阅读:
    sudo 做不到的事
    Oracle 用户操作表权限
    CentOS7.2 使用Shell安装Oracle12c
    package-cleanup
    glibc-commons 依赖解析 版本错误,xxx is duplicate yyy
    Centos7.2 编译安装方式搭建 phpMyAdmin
    Jenkins 环境搭建
    awk 使用案例
    Linux文件系统
    用python写一个计算器
  • 原文地址:https://www.cnblogs.com/seasonsstory/p/3248553.html
Copyright © 2011-2022 走看看