如何摆脱模块 python 安装中的 x86_64-linux-gnu-gcc 错误

How get rid of x86_64-linux-gnu-gcc error in module python installation

大家好,我正在尝试使用 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), but without success. Someone please can help me? Complete track error can be found here complete error trace

您缺少

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

你可以通过

解决这个问题
sudo apt-get install libbz2-dev xz-utils