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!
Related
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?
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.
I am trying to install rJava but it is not working. No matter which version of Java I install, I always get the same error. I already tried to install previous Java versions but that is not working. I also tried to set JAVA_HOME to the JDK folder but nothing seems to work. I am using Windows10.
Code and error:
> install.packages("rJava")
Installing package into ‘C:/Users/x/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rJava 0.9-12 0.9-13 TRUE
installing the source package ‘rJava’
trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-13.tar.gz'
Content type 'application/x-gzip' length 664898 bytes (649 KB)
downloaded 649 KB
* installing *source* package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked
** using staged installation
Generate Windows-specific files (src/jvm-w32) ...
make: Entering directory '/cygdrive/c/Users/x/AppData/Local/Temp/RtmpQffZ3r/R.INSTALL35acefc1be9/rJava/src/jvm-w32'
C:/RBuildTools/3.5/mingw_64/bin/dlltool --as C:/RBuildTools/3.5/mingw_64/bin/as --input-def jvm64.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
C:/RBuildTools/3.5/mingw_64/bin/gcc -O2 -c -o findjava.o findjava.c
C:/RBuildTools/3.5/mingw_64/bin/gcc -s -o findjava.exe findjava.o
make: Leaving directory '/cygdrive/c/Users/x/AppData/Local/Temp/RtmpQffZ3r/R.INSTALL35acefc1be9/rJava/src/jvm-w32'
Find Java...
JAVA_HOME=C:/PROGRA~1/Java/JDK18~1.0_2/jre
=== Building JRI ===
JAVA_HOME=C:/PROGRA~1/Java/JDK18~1.0_2/jre
R_HOME=C:/PROGRA~1/R/R-36~1.3
JDK has no javah.exe - using javac -h . instead
Creating Makefiles ...
Configuration done.
make -C src JRI.jar
make[1]: Entering directory '/cygdrive/c/Users/x/AppData/Local/Temp/RtmpQffZ3r/R.INSTALL35acefc1be9/rJava/jri/src'
C:/PROGRA~1/Java/JDK18~1.0_2/jre/bin/javac -h . -d . ../RList.java ../RBool.java ../RVector.java ../RMainLoopCallbacks.java ../RConsoleOutputStream.java ../Mutex.java ../Rengine.java ../REXP.java ../RFactor.java ../package-info.java
sh: C:/PROGRA~1/Java/JDK18~1.0_2/jre/bin/javac: No such file or directory
make[1]: *** [Makefile.all:41: org/rosuda/JRI/Rengine.class] Error 127
make[1]: Leaving directory '/cygdrive/c/Users/x/AppData/Local/Temp/RtmpQffZ3r/R.INSTALL35acefc1be9/rJava/jri/src'
make: *** [Makefile.all:19: src/JRI.jar] Error 2
**** WARNING: JRI could NOT be built
Set IGNORE=1 if you want to build rJava anyway.
ERROR: configuration failed for package 'rJava'
* removing 'C:/Users/x/Documents/R/win-library/3.6/rJava'
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
Thank you for your help!
I would not recommend installing rJava from sources, because it is entirely unnecessary and compiling packages on Windows requires much better knowledge of tools, Java and your system. Since you are using Windows, please install rJava from CRAN using
install.packages("rJava", type="win.binary")
I'd like to install the packages Rmosek with R 3.4.4 version.
I have this problem:
* installing *source* package ‘Rmosek’ ...
** package ‘Rmosek’ successfully unpacked and MD5 sums checked
Configuring for a UNIX-alike platform (sub-architecture: "")
Found package 'Matrix' version 1.2.14
*** No variable 'PKG_MOSEKHOME' in environment - see configure-vars (configure.vars) argument ***
*** No variable 'PKG_MOSEKHOME' in ./src/setup/Localsys.txt file ***
*** Shell command 'mosek' was not recognized - please validate your installation of MOSEK ***
*** >> PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/opt/local/bin ***
ERROR: configuration failed for package ‘Rmosek’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rmosek’
Warning in install.packages :
installation of package ‘Rmosek’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/42/p9yl3yln6zn8dq_3zdd496kr0000gn/T/RtmpBe0vs2/downloaded_packages’
I solved my problem by this post: https://gist.github.com/mikelove/67ea44d5be5a053e599257fe357483dc#file-rmosek-L19
1) Download mosek from here:
https://www.mosek.com/downloads/
(I downloaded this to my ~/bin)
cd ~/bin
tar -xvf mosektoolslinux64x86.tar.bz2
2) Add this to your ~/.bashrc
export PATH=$PATH:/home/username/bin/mosek/8/tools/platform/linux64x86/bin
3) Get academic license:
https://www.mosek.com/products/academic-licenses/
Check email, put licsense file in ~/mosek
4) Install:
export PKG_MOSEKHOME=/home/username/bin/mosek/8/tools/platform/linux64x86
export PKG_MOSEKLIB=mosek64
Then in R:
install.packages("Rmosek", type="source", INSTALL_opts="--no-multiarch", repos="http://download.mosek.com/R/8")
When I run the code to install BigVis package from GitHub as follows,
devtools::install_github("bigvis")
I get the following output:
Installing github repo bigvis/master from hadley
Downloading master.zip from https://github.com/hadley/bigvis/archive/master.zip
Installing package from /var/folders/dl/hhhtf5f52hz7qrw93wfyk_6h0000gn/T//RtmpgkDD2j/master.zip
arguments 'minimized' and 'invisible' are for Windows only
Installing bigvis
'/Library/Frameworks/R.framework/Resources/bin/R' \
--vanilla CMD INSTALL \
'/private/var/folders/dl/hhhtf5f52hz7qrw93wfyk_6h0000gn/T/RtmpgkDD2j/devtools259f1fe8bc61/bigvis-master' \
--library='/Library/Frameworks/R.framework/Versions/3.0/Resources/library' \
--install-tests
* installing *source* package 'bigvis' ...
** libs
sh: make: command not found
ERROR: compilation failed for package 'bigvis'
* removing '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/bigvis'
Error: Command failed (1)
DO YOU HAVE ANY IDEA HOW I MAY FIX IT? THANKS
The error message sh: make: command not found tells you that the program sh could not find the program make. So my crystal ball tells me you might need to install GNU make. But I know nothing about RStudio nor BigVis.