如何在 MX 上正确安装 rJava Linux

How do I install rJava properly on MX Linux

我正在尝试安装 rJava,因为它是 OpenStreetMap 的依赖项(我想创建一些地图)。

但是,在尝试安装时,出现以下错误:

/usr/bin/ld: cannot find -lpcre2-8
collect2: error: ld returned 1 exit status
make[2]: Leaving directory '/tmp/RtmplfpzAZ/R.INSTALL2958202af052/rJava/jri/src'
make[2]: *** [Makefile.all:35: libjri.so] Error 1
make[1]: Leaving directory '/tmp/RtmplfpzAZ/R.INSTALL2958202af052/rJava/jri'
make[1]: *** [Makefile.all:19: src/JRI.jar] Error 2
make: *** [Makevars:14: jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/home/maanan/R/x86_64-pc-linux-gnu-library/4.0/rJava’
Warning in install.packages :
 installation of package ‘rJava’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpRkgFko/downloaded_packages’

有人可以告诉我我做错了什么吗?我安装了 JDK 和 JRE。

谢谢。

apt install   libpcre2-8-0 libpcre2-dev

这将(应该)让您克服最顶部的错误。当然我不知道你还缺少什么。请 google 以后你可能会遇到的错误 ...