0

When I running R in the container and trying to install a R package littler, there gives some errors:

/usr/bin/ld: cannot find -lpcre
/usr/bin/ld: cannot find -llzma
/usr/bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
Makevars:29: recipe for target 'r' failed
make: *** [r] Error 1
ERROR: compilation failed for package ‘littler’

How can I fix this?

Roland
  • 127,288
  • 10
  • 191
  • 288
gabby
  • 1

1 Answers1

0

Your operating system is missing a number of system development libraries for compiling littler.

You don't say what OS this is, but typically you'd use apt on Ubuntu/Debian and yum on CentOS to install packages like libz-devel which contains the files needed to compile software that works with libz, the compression library, and similarly for libpcre the regular expression library, and so on.

Spacedman
  • 92,590
  • 12
  • 140
  • 224
  • Thanks a lot! It's CentOS. However I'm not a root user. I've tried to export the path to bashrc, but it didn't work either. – gabby Oct 19 '18 at 11:09
  • Can you ask your sysadmin to install all the dependencies needed? Otherwise you may have to compile *everything* from source code. – Spacedman Oct 19 '18 at 11:48