syd
syd

Reputation: 355

Can't install rPython package in R

I'm using CentOS 6.4 and I'm trying to install the R package 'rPython'. It failed with following messages. Anybody knows how to fix this? Thanks!

/usr/bin/ld:     /usr/local/lib/python2.7/config/libpython2.7.a(dictobject.o): relocation     R_X86_64_32S against `PyDict_Type' can not be used when making a shared     object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: could not read     symbols: Bad value
collect2: ld returned 1 exit status
make: *** [rPython.so] Error 1
ERROR: compilation failed for package ‘rPython’
* removing ‘/usr/lib64/R/library/rPython’

Upvotes: 0

Views: 906

Answers (1)

datanalytics.com
datanalytics.com

Reputation: 996

It seems that the default installation of Python on RHEL / CentOS, etc. is not "shared enabled", i.e., it does not include libpython*.so. Just the libpython*.a static library. This prevents some Python applications to run properly. There are instructions in different places, (e.g., here or here) indicating how to install Python as a shared library on CentOS and related Linux flavours.

Upvotes: 2

Related Questions