python - 通过pip安装错误: command 'x86_64-linux-gnu-gcc' failed在virtualenv中安装lxml

标签 python linux gcc virtualenv lxml

当我激活 virtualenv 并键入“pip install 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

最佳答案

你要注意的错误是第一个"/usr/bin/ld: cannot find -lz": tnhat 表示你没有安装zlib-dev。根据您的 Linux 发行版,它在 Ubuntu 中可以命名为 zlib-dev 或 zlib1g-dev,我不知道在其他发行版中。

关于python - 通过pip安装错误: command 'x86_64-linux-gnu-gcc' failed在virtualenv中安装lxml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22239816/

相关文章:

python - 当字典由两个列表组成时,对 OrderedDicts 使用 pprint

python - 如何创建全局运动模糊参数并进行全局控制?

c - 如何在 Linux 和 Solaris 上编译 C?

c++ - 用于 32 位字循环的 ARM 内联汇编

python - tight_layout 抛出错误 : ValueError: max() arg is an empty sequence

linux - 如何在unix/linux中调用FTP文件内的变量

c - Linux 内核在启动时执行的第一个操作是什么?

c++ - 存在间接路由时通过强制转换

为 Mips 架构编译 C

python - 如何检查列列表上的条件?