zhongbiaodev / py-mysql-elasticsearch-sync

MySQL to Elasticsearch sync tool, written in Python.
MIT License
178 stars 54 forks source link

装依赖里的lxml==3.5.0会报错 #17

Open QingGo opened 6 years ago

QingGo commented 6 years ago

错误信息为:

    /home/zeng/anaconda3/include/libxslt/xsltlocale.h:20:10: fatal error: xlocale.h: 没有那个文件或目录
     #include <xlocale.h>
              ^~~~~~~~~~~
    compilation terminated.
    Compile failed: command 'gcc' failed with exit status 1
    cc -I/home/zeng/anaconda3/include -I/home/zeng/anaconda3/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitt2_9ftuj.c -o tmp/xmlXPathInitt2_9ftuj.o
    /tmp/xmlXPathInitt2_9ftuj.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
     main (int argc, char **argv) {
     ^~~~
    cc tmp/xmlXPathInitt2_9ftuj.o -L/home/zeng/anaconda3/lib -lxml2 -o a.out
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
  Rolling back uninstall of lxml
Command "/home/zeng/Code/temp/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-kpljq9kw/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-btc2pjcj/install-record.txt --single-version-externally-managed --compile --install-headers /home/zeng/Code/temp/venv/include/site/python3.6/lxml" failed with error code 1 in /tmp/pip-install-kpljq9kw/lxml/

原因好像是lxml3.5.0没有及时跟上它的依赖库libxslt-dev的更新:https://bugs.launchpad.net/lxml/+bug/1748333

能不能把依赖改为lxml==3.8.0,或者干脆不要锁版本?