How to solve -lpcre2-8 error while installing rJava package in R? - r

/usr/bin/ld: cannot find -lpcre2-8
collect2: error: ld returned 1 exit status
Makefile.all:35: recipe for target 'libjri.so' failed
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory '/tmp/RtmpxlbMFl/R.INSTALLeb81ff01ac6/rJava/jri/src'
Makefile.all:19: recipe for target 'src/JRI.jar' failed
make[1]: *** [src/JRI.jar] Error 2
make[1]: Leaving directory '/tmp/RtmpxlbMFl/R.INSTALLeb81ff01ac6/rJava/jri'
Makevars:14: recipe for target 'jri' failed
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/home/gurjar/R/x86_64-pc-linux-gnu-library/3.6/rJava’
The downloaded source packages are in
‘/tmp/RtmpXFYJ9B/downloaded_packages’
Warning message:
In install.packages("rJava") :
installation of package ‘rJava’ had non-zero exit status
Is there any libraries I might be missing while hammering the same code for installation?

As the previous answer installing the pcer2 works, I use the steps specified on the main site of the library http://www.linuxfromscratch.org/blfs/view/svn/general/pcre2.html
1 st:
Download (HTTP): [https://ftp.pcre.org/pub/pcre/pcre2-10.36.tar.bz2][1]
OR Download (FTP): [ftp://ftp.pcre.org/pub/pcre/pcre2-10.36.tar.bz2][2]
2 nd:
./configure --prefix=/usr \
--docdir=/usr/share/doc/pcre2-10.36 \
--enable-unicode \
--enable-jit \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-pcre2grep-libz \
--enable-pcre2grep-libbz2 \
--enable-pcre2test-libreadline \
--disable-static &&
make
3 rd
make install

Related

Trouble installing Rhtslib in R/R studio

I'm using RStudio on Ubuntu 18 and I'm trying to install the htslib package from the Bioconductor repo, but I'm stuck now.
This is what I get:
* installing *source* package ‘Rhtslib’ ...
** using non-staged installation via StagedInstall field
** libs
cd "htslib-1.7" && make -f "/usr/lib/R/etc/Makeconf" -f "Makefile.Rhtslib"
make[1]: Entering directory '/tmp/RtmpbL8Yil/R.INSTALL1664f5019f4/Rhtslib/src/htslib-1.7'
Makefile.Rhtslib:128: warning: overriding recipe for target '.c.o'
/usr/lib/R/etc/Makeconf:168: warning: ignoring old recipe for target '.c.o'
...
cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
#include <lzma.h>
^~~~~~~~
compilation terminated.
Makefile.Rhtslib:128: recipe for target 'cram/cram_io.o' failed
make[1]: Leaving directory '/tmp/RtmpbL8Yil/R.INSTALL1664f5019f4/Rhtslib/src/htslib-1.7'
Makevars.common:24: recipe for target 'htslib' failed
make[1]: *** [cram/cram_io.o] Error 1
make: *** [htslib] Error 2
ERROR: compilation failed for package ‘Rhtslib’
* removing ‘/home/thiago/R/x86_64-pc-linux-gnu-library/4.1/Rhtslib’
The downloaded source packages are in
‘/tmp/RtmpL0DYph/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
spatial
Warning message:
In .inet_warning(msg) :
installation of package ‘Rhtslib’ had non-zero exit status
What can I do in order to properly install the package?

How do I install rJava properly on MX Linux

I am trying to install rJava, as it's a dependency of OpenStreetMap (I want to create some maps).
However, when trying to install, I get the following error:
/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’
Could someone please tell me what I did wrong? I have JDK and JRE installed.
Thanks.
apt install libpcre2-8-0 libpcre2-dev
That will (should) get you past the error at the very top. Of course I don't know what else you might be missing. Please google future errors you may get ...

How to install R package "curl" on SUSE SLE if "recipe for target 'curl.so' failed

I'm trying to install curl (as sudoer), but I get this error.
> install.packages("curl", lib = .Library)
...
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
/usr/lib64/R/share/make/shlib.mk:6: recipe for target 'curl.so' failed
make: *** [curl.so] Error 1
ERROR: compilation failed for package ‘curl’
* removing ‘/usr/lib64/R/library/curl’
...
I'm working with a SUSE SLE 12.4
> cat /etc/SuSE-release
SUSE Linux Enterprise Server 12 (x86_64)
VERSION = 12
PATCHLEVEL = 4
Seems like it doesn't find ld
If you need other information, I would be more than happy to provide them.

Error when installing asterisk

when trying to install asterisk i get this error:
[root#localhost asterisk-15.4.0]# make install
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk/asterisk-15.4.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk/asterisk-15.4.0/menuselect'
[LD] chan_unistim.o -> chan_unistim.so
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [chan_unistim.so] Error 1
make: *** [channels] Error 2
[root#localhost asterisk-15.4.0]#

Compilation fails when trying to install "pcalg" for R on El Capitan

When trying to install the pcalg package, I am getting the following error:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pcalg.so] Error 1
ERROR: compilation failed for package ‘pcalg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/pcalg’
The downloaded source packages are in
‘/private/var/folders/54/nwpr9hkn49b1m4h3hjmwph6r0000gn/T/RtmpREqD5T/downloaded_packages’
Warning message:
In install.packages("pcalg") :
installation of package ‘pcalg’ had non-zero exit status
I'm assuming this is because the gfortan package now in gcc, but I don't know how to point it to the right place. Does anybody know how to fix this?

Resources