【问题标题】:How get rid of x86_64-linux-gnu-gcc error in module python installation如何摆脱模块 python 安装中的 x86_64-linux-gnu-gcc 错误
【发布时间】:2019-02-23 01:32:33
【问题描述】:

大家好,我正在尝试使用 pip3 在 linux Mint 上安装 rpy2 python 模块,但出现此错误:

...
/usr/bin/x86_64-linux-gnu-ld: cannot find -llzma
/usr/bin/x86_64-linux-gnu-ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, 
tokenize;__file__='/tmp/pip-build-t481_z1y/rpy2/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-p7gpudid-record/install-record.txt --single-version-externally-
managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-
build-t481_z1y/rpy2/

我尽我所能,但这个错误仍然存​​在。我已经应用了此处介绍的可能解决方案 (same error),但没有成功。有人可以帮助我吗?完整的轨道错误可以在这里找到complete error trace

【问题讨论】:

    标签: python-3.x pip rpy2 linux-mint


    【解决方案1】:

    您缺少一些对

    的依赖项
    • xz-开发
    • bzip2-devel

    你可以解决这个问题

    sudo apt-get install libbz2-dev xz-utils
    

    【讨论】:

    • 嗨,丹尼,感谢您的回答,但我使用的是基于 Ubuntu 的 linux Mint。那么如何安装这个依赖项呢?我认为使用 yum 是不可能的。
    • 嗨,丹尼,感谢您所做的一切。从您的回答中,我可以找出正确的行命令:sudo apt-get install libbz2-dev xz-utils。但再次非常感谢您。
    • @kizus 不客气,我建议您在问题中添加标签 linux Mint。我会相应地更新答案。
    猜你喜欢
    • 2016-01-23
    • 1970-01-01
    • 1970-01-01
    • 2016-08-27
    • 1970-01-01
    • 2014-04-09
    • 1970-01-01
    • 2014-04-29
    • 1970-01-01
    相关资源
    最近更新 更多