I've installed R-devel on Ubuntu following this guide. When trying to install magrittr with install.packages("magrittr") I'm getting this:
* installing *source* package ‘magrittr’ ...
** package ‘magrittr’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'checkCompilerOptions' not found
Calls: ::: -> get
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/magrittr’
The downloaded source packages are in
‘/tmp/RtmpagwvBj/downloaded_packages’
Warning message:
In install.packages("magrittr") :
installation of package ‘magrittr’ had non-zero exit status
The single other stackoverflow question refering to this error didn't help me. Can anyone help?
What I'm really trying to do is to install the latest development version of the Gviz package. In order to do that I must use the development version of bioconductor and R. Down in the dependency tree for Gviz comes magrittr.
My sessionInfo():
R Under development (unstable) (2016-02-18 r70185)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=nb_NO.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=nb_NO.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=nb_NO.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] tools_3.3.0 tcltk_3.3.0
I had the same problem installing the raster package. I found out here that the problem was a conflict between library directories exported by the second script of the guide you are mentionning:
#!/bin/bash
export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library::/usr/lib/R/library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$#"
So I removed the library folders not related to my R-devel instance:
#!/bin/bash
export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$#"
And it finally worked.
I was able to install Gviz! This is what got me there:
I tried using devtools::install_github("Bioconductor-mirror/Gviz") to install Gviz instead of doing it with biocLite("Gviz"). This got me the checkCompilerOptions error, but now with the package matrixStats.
I installed matrixStats using devtools::install_github("HenrikBengtsson/matrixStats"). This worked.
At this point I tried installing magrittr again, using install.packages("magrittr"). It worked somehow!
I could now install Gviz with devtools::install_github("Bioconductor-mirror/Gviz")
I still have no idea about the checkCompilerOptions error, and would appreciate any ideas.
Related
When trying to install the treesnip package from github using remotes::install_github("curso-r/treesnip"), I get the following error:
remotes::install_github("curso-r/treesnip")
Downloading GitHub repo curso-r/treesnip#HEAD
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
√ checking for file 'C:\Users\SAR.V-LOG\AppData\Local\Temp\RtmpENiM7Q\remotes38701dfb49f3\curso-r-treesnip-c70a89b/DESCRIPTION' (375ms)
- preparing 'treesnip': (736ms)
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
Removed empty directory 'treesnip/.github/workflows'
Removed empty directory 'treesnip/.github'
NB: this package now depends on R (>= 3.5.0)
WARNING: Added dependency on R >= 3.5.0 because serialized objects in serialize/load version 3 cannot be read in older versions of R. File(s) containing such objects: 'treesnip/inst/benchmark_parallel_processing_vignette.rds'
- building 'treesnip_0.1.0.tar.gz'
* installing *source* package 'treesnip' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'treesnip'
finding HTML links ... done
add_boost_tree_catboost html
add_boost_tree_lightgbm html
add_decision_tree_tree html
multi_predict._catboost.Model html
multi_predict._lgb.Booster html
predict_lightgbm_classification_class html
predict_lightgbm_classification_prob html
predict_lightgbm_classification_raw html
predict_lightgbm_regression_numeric html
train_catboost html
train_lightgbm html
train_tree html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'treesnip':
.onLoad failed in loadNamespace() for 'treesnip', details:
call: NULL
error: The values passed to `set_encoding()` are missing arguments: 'allow_sparse_x'
error: loading failed
running stopped
*** arch - x64
Error: package or namespace load failed for 'treesnip':
.onLoad failed in loadNamespace() for 'treesnip', details:
call: NULL
error: The values passed to `set_encoding()` are missing arguments: 'allow_sparse_x'
Fejl: loading failed
running stopped
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/SAR.V-LOG/OneDrive - VELUX/Documents 1/R/R-4.0.2/library/treesnip'
Error: Failed to install 'treesnip' from GitHub:
(converted from warning) installation of package ‘C:/Users/SAR~1.V-L/AppData/Local/Temp/RtmpENiM7Q/file38706c2c7239/treesnip_0.1.0.tar.gz’ had non-zero exit status
my sessionInfo():
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252
[4] LC_NUMERIC=C LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2
I works fine when running on another PC.
I also tried changing the library location to C:/Users/SAR.V-LOG/, but that didn't help either.
Further I tried to provide INSTALL_opts = "--no-test-load". When I do that the installation finished wihtout errors, but when I try to load the library using library(treesnip) I get the same error: The values passed to set_encoding() are missing arguments: 'allow_sparse_x'
Do you know what is causing this error and how I can fix it?
treesnip is fixed. It now depends on parsnip (>= 0.1.3.9000) https://github.com/curso-r/treesnip/commit/902a33d9f156c10da6dbe1bd9cccb65926077197
Try using parsnip 0.1.3 (not the development version in this case). It looks like 0.1.3.9000 has some breaking changes coming that will be handled in a new version of parsnip-adjacent packages.
The warning message indicates:
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
You may need to upgrade your Rtools, which can be done here: https://cran.r-project.org/bin/windows/Rtools/
Let me know if this fixes your problem.
Also I have added a GitHub Issue Here: https://github.com/tidymodels/parsnip/issues/376
I've installed qdap:
install.packages("qdap")
It takes a while to donwload everything but the console fills up with all the downloads and at the end I get a message like this:
Warning in install.packages :
installation of package ‘qdap’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpeTzuKz/downloaded_packages’
> library(qdap)
Error in library(qdap) : there is no package called ‘qdap’
>
This SO post led me to try adding dependencies = TRUE but the issue remains.
Here's session info
sessionInfo():
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
Another post I found yesterday (cannot find it again now with a Google search) suggested I remove existing qdap files within my library directory, close my session, restart and fresh install. There was no package exactly called qdap but some with qdap in the name which I removed. My issue remained, I am unable to install qdap.
I'm not sure what other information to provide? Any help appreciated.
Here are the errors generated when attempting to install qdap:
./configure: line 3736: /usr/lib/jvm/default-java/jre/bin/java: No
such file or directory no configure: error: Java interpreter
'/usr/lib/jvm/default-java/jre/bin/java' does not work ERROR:
configuration failed for package ‘rJava’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/rJava’ Warning in install.packages : installation of package ‘rJava’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘openNLPdata’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/openNLPdata’ Warning
in install.packages : installation of package ‘openNLPdata’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘xlsxjars’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/xlsxjars’ Warning in install.packages : installation of package ‘xlsxjars’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘venneuler’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/venneuler’ Warning
in install.packages : installation of package ‘venneuler’ had
non-zero exit status ERROR: dependencies ‘openNLPdata’, ‘rJava’ are
not available for package ‘openNLP’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/openNLP’ Warning in install.packages : installation of package ‘openNLP’ had
non-zero exit status ERROR: dependencies ‘rJava’, ‘xlsxjars’ are not
available for package ‘xlsx’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/xlsx’ Warning in install.packages : installation of package ‘xlsx’ had
non-zero exit status ERROR: dependencies ‘openNLP’, ‘venneuler’,
‘xlsx’ are not available for package ‘qdap’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/qdap’ Warning in install.packages : installation of package ‘qdap’ had
non-zero exit status
Since this looks like a rJava issue I found this post and tried the top voted answer in the terminal:
apt-get install r-cran-rjava
Resulted in:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I'm hoping theres a way around this without being a root user? I'm not as familiar with linux. I'm able to install other p packages.
There is a solution for this issue when you have no root access.
Download Java (make sure to install JDK) and install it inside your $HOME
You can do that as Oracle's Java is just a tar.gz package
Make sure to set JAVA_HOME
export JAVA_HOME=$HOME/opt/my_jdk_installation
Once you have Java you have to reconfigure R
Simply tell R where your Java is
R CMD javareconf \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA_HOME}/bin/java \
JAVAC=${JAVA_HOME}/bin/javac \
JAVAH=${JAVA_HOME}/bin/javah \
JAR=${JAVA_HOME}/bin/jar \
JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/server \
JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux"
Since now, R should use your personal installation of Java. This way, you don't depend on sys admin.
I've been for last couple of hours trying to install the RMongo package with the following output:
> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://repo.bppt.go.id/cran/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/RMongo’
The downloaded source packages are in
‘/tmp/RtmpHZoomn/downloaded_packages’
Warning message:
In install.packages("RMongo") :
installation of package ‘RMongo’ had non-zero exit status
I've also identified the same error trying to install xlsx.
I don't know what has changed in the past distros, since I've tried this with Ubuntu 16.04.2 and Ubuntu 17.04, with the same result.
This is a description of the R environment in the Ubuntu 16.04.2 distro:
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=es_ES.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=es_ES.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0 tcltk_3.4.0
Any idea about what can be happening?
linux-image-3.13.0-121-generic and linux-image-4.4.0-81-generic contain a fix for the Stack Clash vulnerability.
Be careful with kernel updates, which fix this vulnerability. Current patch breaks many java (sun/oracle and openjdk) applications. See Bug #1699772: linux-image-4.4.0-81-generic, linux-image-3.13.0-121-generic Regression: many user-space apps crashing. The solution is to temporary reboot system with old kernel (linux-image-3.13.0-119-generic in Trusty).
Ubuntu kernel developers will prepare new patch in a few days.
UPDATE: Latest updates (at least image-4.4.0-83-generic, linux-image-4.8.0-58-generic, linux-image-4.10.0-26-generic) fix this vulnerability and problems with user-space programs.
This doesn't answer to the problems that I'm experiencing with RMongo, but solves the problem for me, so I hope it can be useful.
I've continued making some tests. Since this problem started when RMongo suddenly stopped from working, and taking into account that I had a similar installation that was working properly, I started to compare both environments.
I've checked that, in the system that is failing, some software updates were performed (you can check them below):
The following NEW packages will be installed
libmircommon7 libmircore1 linux-headers-4.4.0-81 linux-headers-4.4.0-81-generic linux-image-4.4.0-81-generic
linux-image-extra-4.4.0-81-generic
The following packages will be upgraded:
click firefox firefox-locale-en flashplugin-installer gir1.2-click-0.4 google-chrome-stable grub-common grub-pc
grub-pc-bin grub2-common libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libclick-0.4-0 libepoxy0
libgnutls-openssl27 libgnutls30 libmirclient9 libmircookie2 libmirprotobuf3 libmwaw-0.3-3 libnss3 libnss3-nssdb
libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5
libqt5sql5-sqlite libqt5test5 libqt5widgets5 libqt5xml5 libssl-dev libssl-doc libssl1.0.0 libvlc5 libvlccore8
libzzip-0-13 linux-firmware linux-headers-generic linux-image-generic linux-libc-dev locales multiarch-support
openssl python3-click-package vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba
So, I've checked one by one this packages, and it turns out that the root of the problem is the new kernel 4.4.0-81.
In order to be sure that this is the root of the problem, I've launched by Ubuntu distro with the previous version of the kernel that I had in my laptop: 4.4.0-79
And this is the result of the installation:
> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RMongo)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
> install.packages("xlsx")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/xlsx_0.5.7.tar.gz'
Content type 'application/x-gzip' length 312839 bytes (305 KB)
==================================================
downloaded 305 KB
* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xlsx)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
Both packages, xlsx and RMongo, are now successfully installed and working.
I've also checked the relationship between xlsx and RMongo, and I'm afraid that problem underneath is rJava (common dependency). As a matter of fact, in order to be sure about this, I've made tests with other packages rJava-dependant (RWeka) and I had the same problem, solved after changing the kernel version.
== UPDATE ==
After the last kernel update, from 4.4.0-81 to 4.4.0-83, the problem has been fixed.
Same problem (at least for package "xlsx") occurs in Ubuntu 14.04 LTS with kernel 3.13.0-121-generic. When booting with the previous kernel (3.13.0-119-generic) installation works and library loads.
UPDATE: problem appears to be solved in Ubuntu 14.04 LTS by new kernel 3.13.0-123-generic
I'm having problem installing any package, also from package archive. In this case showing error trying to install ggplot2:
* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/juanchi/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so':
libicui18n.so.52: no se puede abrir el archivo del objeto compartido: No existe el archivo o el directorio
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/home/juanchi/R/x86_64-pc-linux-gnu-library/3.2/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpVU9aIn/downloaded_packages’
This is my session Info
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10
locale:
[1] LC_CTYPE=pt_BR.UTF-8 LC_NUMERIC=C LC_TIME=pt_BR.UTF-8
[4] LC_COLLATE=es_ES.UTF-8 LC_MONETARY=pt_BR.UTF-8 LC_MESSAGES=es_ES.UTF-8
[7] LC_PAPER=pt_BR.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] rsconnect_0.4.1.4 tools_3.2.2
Thanks in advance!!
Your upgrade to Ubuntu 15.10 meant that the ICU library went from version 52 to a newer version (55, if I recall). But the stringi package was built against 52, and is now broken. That can happen to your R packages when they are outside of the Ubuntu package management system.
So you need to re-install stringi, which is required by ggplot2, and then ggplot2 will install and also load, avoiding the erorr you.
You could avoid these upgrade problems by using the pre-built versions of ggplot2 and its dependencies: do sudo apt-get install r-cran-ggplot2.
Thank you Dirk, your advice to install the package via the ubuntu terminal solved my problem as well: I had an almost identical error message when I was trying to install reshape2 on Ubuntu 15.10.
I just,
1) uninstalled the currently installed version of reshape2 through the R terminal (if you use R-Studio you can also do this in the "packages" window where the packages are listed),
2) run sudo apt-get install r-cran-reshape2 in the ubuntu terminal,
3) restarted the computer.
I was recently trying to open a shiny server app on my server and got this error which I have never seen before.
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘shiny’
Execution halted
I am assuming an update broke something. However when starting R on my machine both library(shiny) as well as library(Rcpp) load without any issues.
So I tried re-installing shiny-server. According to their instructions here, however I basically get the same error as above:
sudo su - \
> -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages('shiny', repos='http://cran.rstudio.com/')
Installing package into â/usr/local/lib/R/site-libraryâ
(as âlibâ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/shiny_0.12.1.tar.gz'
Content type 'application/x-gzip' length 1473559 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
* installing *source* package âshinyâ ...
** package âshinyâ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called âRcppâ
ERROR: lazy loading failed for package âshinyâ
* removing â/usr/local/lib/R/site-library/shinyâ
* restoring previous â/usr/local/lib/R/site-library/shinyâ
The downloaded source packages are in
â/tmp/RtmpUfc19u/downloaded_packagesâ
Warning message:
In install.packages("shiny", repos = "http://cran.rstudio.com/") :
installation of package âshinyâ had non-zero exit status
I have no idea why this is, since both shiny and Rcpp install and load flawlessy when just starting R or even when starting R as sudo.
My sessionInfo() output is:
R version 3.2.1 (2015-06-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_0.12.1 Rcpp_0.11.6
loaded via a namespace (and not attached):
[1] R6_2.0.1 htmltools_0.2.6 digest_0.6.8 xtable_1.7-4
[5] httpuv_1.3.2 mime_0.3
Thanks in advance for any pointers or help.
Apparently, it was a library/permissions issue. I am still a bit foggy on R package managment and all the possible different library locations (certainly when working with Rstudio server and shiny server and bioconductor etc.) and when or not to use sudo to install packages. Any good guidelines on that would probably have avoided this question.
The code suggested by the people at Rstudio (sudo su -\ -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\"") got me thinking: when I run just R in the terminal or sudo R the library(Rcpp) and library(shiny) work so I just did sudo su and then ran R interactively with install.packages('shiny', repos='http://cran.rstudio.com/'). This showed that apparently for the root user (su) the Rcpp package was not installed (!). After manually installing the package I could also re-install shiny and my shiny app started working again.
What concerns me still about this is how the Rcpp package "dissappeared" in the first place from the root R packages. I cannot remember removing it myself and would find it rather unpleasant behavior if an update would have caused this.
Either way: the issue is resolved. Maybe this answer can help others with a similar issue.