人生如戏 全靠演技

Ubuntu lxml 编译问题

/usr/bin/ld: cannot find -lz

collect2: error: ld returned 1 exit status

error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

—————————————-
Cleaning up…
Command /usr/bin/python -c “import setuptools, tokenize;__file__=’/tmp/pip_build_root/lxml/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(__file__).read().replace(‘\r\n’, ‘\n’), __file__, ‘exec’))” install –record /tmp/pip-2Yd2oO-record/install-record.txt –single-version-externally-managed –compile failed with error code 1 in /tmp/pip_build_root/lxml
Storing debug log for failure in /root/.pip/pip.log

解决方法

sudo apt-get install build-essential bison libc6-dev

/usr/bin/ld: cannot find -lz


解决方法

apt-get install zlib1g-dev

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注