recompile with -fPIC报错解决
编辑
4
2024-10-02

背景
安装synapser R包时需要PythonEmbedInR R包依赖,安装这个依赖命令如下
install.packages("PythonEmbedInR",destdir = '/home/xhs/Rpack/download',repos=c("http://cran.fhcrc.org", "http://ran.synapse.org"))
安装失败,报错如下
一大串的编译错误
/usr/lib/libpython3.6m.a(myreadline.o): relocation R_X86_64_32 against xxxxxxx’ can not be used when making a shared object; recompile with -fPIC.`
解决方案
这个是一个共享库的问题,直接去/usr/lib/目录下重名后,再安装
sudo mv libpython3.6m.a libpython3.6m.a.bak
再返回rstudio安装PythonEmbedInR,成功无报错。
- 0
- 0
-
赞助
支付宝
微信
-
分享