Trouble installing Rhtslib in R/R studio - r

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?

Related

ERROR: compilation failed for package ‘ChemmineOB’

ChemmineOB.cpp:1569:10: fatal error: openbabel/obutil.h: No such file or directory
1569 | #include <openbabel/obutil.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:177: ChemmineOB.o] Error 1
ERROR: compilation failed for package ‘ChemmineOB’
* removing ‘/home/mamata/R/x86_64-pc-linux-gnu-library/4.2/ChemmineOB’
The downloaded source packages are in
‘/tmp/Rtmpzscekt/downloaded_packages’
Warning message:
In install.packages(...) :
installation of package ‘ChemmineOB’ had non-zero exit status
i am trying to install ChemmineOB and I get the this error. I have openbabel installed in the system already. Can anyone help?

Errors when install_github was used for install package 'cindex' in Rstudio on windows machine

When I run the command install_github("chrchang/plink-ng", subdir="/2.0/cindex") in Rstudio, I get the following error message:
Downloading GitHub repo chrchang/plink-ng#HEAD
chrchang-plink-ng-b39d989/2.0/cindex/src/include: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\cindex\\src\\include'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/include: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\include'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/libdeflate: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\libdeflate'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/pgenlib_ffi_support.cpp: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\pgenlib_ffi_support.cpp'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/pgenlib_ffi_support.h: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\pgenlib_ffi_support.h'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/pvar_ffi_support.cpp: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\pvar_ffi_support.cpp'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/pvar_ffi_support.h: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\pvar_ffi_support.h'
chrchang-plink-ng-b39d989/2.0/pgenlibr/src/zstd: Can't create '\\\\?\\C:\\Users\\xxx\\AppData\\Local\\Temp\\Rtmp6PucTt\\remotes68581e00563b\\chrchang-plink-ng-b39d989\\2.0\\pgenlibr\\src\\zstd'
tar.exe: Error exit delayed from previous errors.
√ checking for file 'C:\Users\xxx\AppData\Local\Temp\Rtmp6PucTt\remotes68581e00563b\chrchang-plink-ng-b39d989\2.0\cindex/DESCRIPTION' ...
- preparing 'cindex':
√ checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'cindex_0.2.tar.gz'
Installing package into ‘C:/Users/xxx/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'cindex' ...
** using staged installation
** libs
*** arch - i386
make: *** No rule to make target 'include/plink2_base.o', needed by 'cindex.dll'. Stop.
ERROR: compilation failed for package 'cindex'
* removing 'C:/Users/xxx/Documents/R/win-library/4.0/cindex'
错误: Failed to install 'cindex' from GitHub:
(由警告转换成)installation of package ‘C:/Users/xxx/AppData/Local/Temp/Rtmp6PucTt/file685860d615b0/cindex_0.2.tar.gz’ had non-zero exit status
此外: Warning message:
In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\xxx\AppData\Local\Temp\Rtmp6PucTt\file68583f07ec.tar.gz" -C "C:/Users/xxx/AppData/Local/Temp/Rtmp6PucTt/remotes68581e00563b"’ returned error code 1*
install_github() on Windows 10 R does not seem to handle Git symlinks correctly. A workaround is to clone the repository and manually expand the symlinks in your copy.

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 ...

Trouble installing 'Matrix' package using packrat on browser based rStudio

I have troubles with importing project from a local machine to a server-based rStudio environment, when i use the specified repository and guidelines i get this error when i try to restore my local packrat library:
Installing Matrix (1.2-10) ...
[1] "Command failed (1)\n\nFailed to run system command:\n\n\t'/usr/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmpKwkp2a/Matrix' --library='/home/robinzacha/51_SocialCharging-master-4f660542fd180508e8e7fbbd0f88d6569ec89acc/packrat/lib/x86_64-pc-linux-gnu/3.3.3' --install-tests --no-docs --no-multiarch --no-demo \n\nThe command failed with output:\n* installing *source* package 'Matrix' ...\n** package 'Matrix' successfully unpacked and MD5 sums checked\n** libs\nmake[1]: Entering directory `/tmp/RtmpKwkp2a/Matrix/src/CHOLMOD'\n( cd Lib ; make clean )\nmake[2]: Entering directory `/tmp/RtmpKwkp2a/Matrix/src/CHOLMOD/Lib'\nmake[2]: Leaving directory `/tmp/RtmpKwkp2a/Matrix/src/CHOLMOD/Lib'\nmake[1]: Leaving directory `/tmp/RtmpKwkp2a/Matrix/src/CHOLMOD'\nmake[1]: Entering directory `/tmp/RtmpKwkp2a/Matrix/src/COLAMD'\n( cd Source ; make clean )\nmake[2]: Entering directory `/tmp/RtmpKwkp2a/Matrix/src/COLAMD/Source'\nmake[2]: Leaving directory `/tmp/RtmpKwkp2a/Matrix/src/COLAMD/Source'\nmak... <truncated>
Error: Command failed (1)
Failed to run system command:
'/usr/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmpKwkp2a/Matrix' --library='/home/robinzacha/51_SocialCharging-master-4f660542fd180508e8e7fbbd0f88d6569ec89acc/packrat/lib/x86_64-pc-linux-gnu/3.3.3' --install-tests --no-docs --no-multiarch --no-demo
The command failed with output:
* installing source package 'Matrix' ...
** package 'Matrix' successfully unpacked and MD5 sums checked
** libs
make[1]: Entering directory /tmp/RtmpKwkp2a/Matrix/src/CHOLMOD'
( cd Lib ; make clean )
make[2]: Entering directory/tmp/RtmpKwkp2a/Matrix/src/CHOLMOD/Lib'
make[2]: Leaving directory /tmp/RtmpKwkp2a/Matrix/src/CHOLMOD/Lib'
make[1]: Leaving directory/tmp/RtmpKwkp2a/Matrix/src/CHOLMOD'
make[1]: Entering directory /tmp/RtmpKwkp2a/Matrix/src/COLAMD'
( cd Source ; make clean )
make[2]: Entering directory/tmp/RtmpKwkp2a/Matrix/src/COLAMD/Source'
make[2]: Leaving directory `/tmp/RtmpKwkp2a/Matrix/src/COLAMD/Source'
make[1]: Leaving dir
Do anyone have an idea to fix this problem? I've searched the web for similar problems and haven't had any luck finding anything useful to my understanding.
Thanks in advance!

R fedora package .lme4 error on install RcppEigen.h missing

Attempts to install package lme4 result in:
cpp -o external.o
In file included from external.cpp:8:0:
predModule.h:12:23: fatal error: RcppEigen.h: No such file or directory
compilation terminated.
/usr/lib64/R/etc/Makeconf:139: recipe for target 'external.o' failed
make: *** [external.o] Error 1
ERROR: compilation failed for package ‘lme4’
The system is Fedora Core 23
R is 3.3.1
Searches do not produce references to resolve the RccpEigen reference. Is there a workaround.

Resources