Error when installing TDA package on R: recipe for target 'diag.o' failed - r

Using Ubuntu 16.04 and R 3.4.1. I get an error message when installing R package TDA. It appears to be something with making CGAL, diag.cpp, and/or diag.o (full error printout at end).
I looked closely at this:
Error when installing TDA package on R
but I have libgmp3-dev and libmpfr-dev installed (I tried removing them and then I did get that error message). I also tried removing and manually installing the Imports and LinkingTo packages for TDA (https://cran.r-project.org/web/packages/TDA/index.html), but no luck. Also tried
running R with sudo and install.packages
downloading the binaries and installing with sudo R CMD INSTALL TDA
installing CGAL
Any help appreciated.
install.packages("TDA")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.revolutionanalytics.com/src/contrib/TDA_1.5.1.tar.gz'
Content type 'application/octet-stream' length 2008762 bytes (1.9 MB)
==================================================
downloaded 1.9 MB
* installing *source* package ‘TDA’ ...
** package ‘TDA’ successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I/usr/share/R/include -I. -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/usr/local/lib/R/site-library/BH/include" -DBOOST_DISABLE_THREADS -DCGAL_EIGEN3_ENABLED -DCGAL_HEADER_ONLY -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I/usr/share/R/include -I. -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/usr/local/lib/R/site-library/BH/include" -DBOOST_DISABLE_THREADS -DCGAL_EIGEN3_ENABLED -DCGAL_HEADER_ONLY -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c diag.cpp -o diag.o
In file included from ./CGAL/Triangulation_ds_cell_base_3.h:27:0,
from ./CGAL/Triangulation_data_structure_3.h:47,
from ./CGAL/Triangulation_3.h:43,
from ./CGAL/Delaunay_triangulation_3.h:37,
from ./tdautils/cgalUtils.h:5,
from diag.cpp:25:
./CGAL/Triangulation_ds_cell_base_3.h: In instantiation of ‘void CGAL::Triangulation_ds_cell_base_3<TDS>::set_neighbor(int, CGAL::Triangulation_ds_cell_base_3<TDS>::Cell_handle) [with TDS = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; CGAL::Triangulation_ds_cell_base_3<TDS>::Cell_handle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Alpha_shape_cell_base_3<CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > > >, CGAL::Boolean_tag<false>, CGAL::Boolean_tag<false> >, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’:
./CGAL/Triangulation_data_structure_3.h:2782:7: required from ‘CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::Vertex_handle CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::insert_increase_dimension(CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::Vertex_handle) [with Vb = CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>; Cb = CGAL::Alpha_shape_cell_base_3<CGAL::Epick>; Concurrency_tag_ = CGAL::Sequential_tag; CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::Vertex_handle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick, CGAL::Triangulation_vertex_base_3<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > > >, CGAL::Boolean_tag<false>, CGAL::Boolean_tag<false> >, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’
./CGAL/Triangulation_3.h:623:16: required from ‘void CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::init_tds() [with GT = CGAL::Epick; Tds_ = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; Lock_data_structure_ = CGAL::Default]’
./CGAL/Triangulation_3.h:655:15: required from ‘CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::Triangulation_3(const GT&, CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::Lock_data_structure*) [with GT = CGAL::Epick; Tds_ = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; Lock_data_structure_ = CGAL::Default; CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::Lock_data_structure = void]’
./CGAL/Delaunay_triangulation_3.h:229:26: required from ‘CGAL::Delaunay_triangulation_3<Gt, Tds_, CGAL::Default, Lock_data_structure_>::Delaunay_triangulation_3(const Gt&, CGAL::Delaunay_triangulation_3<Gt, Tds_, CGAL::Default, Lock_data_structure_>::Lock_data_structure*) [with Gt = CGAL::Epick; Tds_ = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; Lock_data_structure_ = CGAL::Default; CGAL::Delaunay_triangulation_3<Gt, Tds_, CGAL::Default, Lock_data_structure_>::Lock_data_structure = void]’
./CGAL/Alpha_shape_3.h:263:51: required from ‘CGAL::Alpha_shape_3<Dt, ExactAlphaComparisonTag>::Alpha_shape_3(const InputIterator&, const InputIterator&, const NT&, CGAL::Alpha_shape_3<Dt, ExactAlphaComparisonTag>::Mode) [with InputIterator = std::_List_iterator<CGAL::Point_3<CGAL::Epick> >; Dt = CGAL::Delaunay_triangulation_3<CGAL::Epick, CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > >; ExactAlphaComparisonTag = CGAL::Boolean_tag<false>; CGAL::Alpha_shape_3<Dt, ExactAlphaComparisonTag>::NT = double]’
diag.cpp:680:65: required from here
./CGAL/Triangulation_ds_cell_base_3.h:166:39: error: ‘class CGAL::Alpha_shape_cell_base_3<CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > > >, CGAL::Boolean_tag<false>, CGAL::Boolean_tag<false> >’ has no member named ‘operator()’
CGAL_triangulation_precondition(this != n->operator());
^
./CGAL/triangulation_assertions.h:130:20: note: in definition of macro ‘CGAL_triangulation_precondition’
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX
^
/usr/lib/R/etc/Makeconf:168: recipe for target 'diag.o' failed
make: *** [diag.o] Error 1
ERROR: compilation failed for package ‘TDA’
* removing ‘/usr/local/lib/R/site-library/TDA’
The downloaded source packages are in
‘/tmp/RtmpFqA1Fu/downloaded_packages’
Warning message:
In install.packages("TDA") :
installation of package ‘TDA’ had non-zero exit status
>

TDA v1.5.1 has the same issue on my Linux servers. Try install a previous version:
install.packages("devtools")
require(devtools);
install_version('TDA', version='1.4.1')

Related

Error using rcpp armadillo when making R package

I am trying to get into using C++ code in my R packages. I created a test package using
usethis::create_package("~/Documents/ptest")
and I then set up the C++ necessaries using
usethis::use_rcpp_armadillo("sum_func")
I then created R/test-package.R and pasted in
## usethis namespace: start
#' #useDynLib ptest, .registration = TRUE
## usethis namespace: end
NULL
## usethis namespace: start
#' #importFrom Rcpp sourceCpp
## usethis namespace: end
NULL
In sum_func.cpp I then put
//sum.cpp
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
double rcpp_sum(NumericVector v){
double sum = 0;
for(int i=0; i<v.length(); ++i){
sum += v[i];
}
return(sum);
}
I then created R/sum__func.R and put in
#' My Sum Function
#'
#' #param vec A vector of values
#'
#' #return The sum
#' #export
#'
#' #examples
#' my_sum(1:10)
my_sum <- function(vec) {
rcpp_sum(vec)
}
But then when I run devtools::load_all(".") I get
> ℹ Loading ptest Exports from
> /Users/hwarden/Documents/ptest/src/sum_func.cpp: double
> rcpp_sum(NumericVector v)
>
> /Users/hwarden/Documents/ptest/src/RcppExports.cpp updated.
> /Users/hwarden/Documents/ptest/R/RcppExports.R updated. Re-compiling
> ptest ─ installing *source* package ‘ptest’ ... ** using staged
> installation ** libs clang++ -mmacosx-version-min=10.13
> -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include'
> -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include'
> -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o clang++ -mmacosx-version-min=10.13 -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include'
> -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include'
> -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c sum_func.cpp -o sum_func.o clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib
> -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o ptest.so RcppExports.o sum_func.o
> -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' 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: ***
> [ptest.so] Error 1 ERROR: compilation failed for package ‘ptest’ ─
> removing
> ‘/private/var/folders/n4/lwxlchrn2s7gvc878rw7ln1m0000gn/T/RtmpjJw195/devtools_install_c9e2c847f68/ptest’
> Error in `(function (command = NULL, args = character(),
> error_on_status = TRUE, …`: ! System command 'R' failed
> --- Exit status: 1 stdout & stderr: <printed>
> ---
I get an error but after googling I can't figure out how to solve it.
Thank you #dirk-eddelbuettel,
This article was the most useful.
I'm not an expert, but for me this worked (or at least got me to my next error).
I ran
brew reinstall gcc
to make sure I had the most up to date gfortran. Then I made a ~/.R/Makevars (as I did not have one already). I then wrote this in there
FC = usr/local/opt/gcc/bin/gfortran
F77 = /usr/local/opt/gcc/bin/gfortran
FLIBS = -L/usr/local/opt/gcc/lib
I restarted R and the package then loaded successfully! Many thanks!

How to use a user-defined data C structure into an R package

This minimal example compiles when I "source" the file:
/*
read_header.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <RcppCommon.h>
typedef struct {
int my_data;
} MY_HEADER_INFO;
namespace Rcpp {
template <> SEXP wrap(const MY_HEADER_INFO& x);
}
#include <Rcpp.h>
namespace Rcpp {
template <>
SEXP wrap(const MY_HEADER_INFO& x) {
std::vector<std::string> names;
std::vector<SEXP> elements(1);
// do something with the elements and names
names.push_back("my_data");
elements[0] = Rcpp::wrap( x.my_data );
};
}
//' #export
// [[Rcpp::export]]
MY_HEADER_INFO read_header() {
MY_HEADER_INFO *header;
header = (MY_HEADER_INFO*)malloc(sizeof(MY_HEADER_INFO));
memset(header, 0, sizeof(MY_HEADER_INFO));
return *header;
}
When I try to build it in RStudio into a package (CMD + SHIFT + B), I get the following, long, error message, that clearly lists the problem is my user-defined return structure, MY_HEADER_INFO:
DESCRIPTION
Package: myPackage
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Depends: R (>= 4.0.0)
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.0
Imports:
Rcpp
Suggests:
knitr,
rmarkdown,
testthat
VignetteBuilder: knitr
LinkingTo:
Rcpp
NAMESPACE
# Generated by roxygen2: do not edit by hand
export(read_header)
I receive the following error:
==> Rcpp::compileAttributes()
* Updated src/RcppExports.cpp
* Updated R/RcppExports.R
==> devtools::document(roclets = c('rd', 'collate', 'namespace'))
Updating myPackage documentation
Loading myPackage
Re-compiling myPackage
─ installing *source* package ‘myPackage’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp:9:1: error: unknown type name 'MY_HEADER_INFO'
MY_HEADER_INFO read_header();
^
1 error generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘myPackage’
─ removing ‘/private/var/folders/gl/jvj9b0xn34lgq6_h9370p8q80000gn/T/RtmpLKsw0o/devtools_install_1f333d54be59/myPackage’
Error: System command 'R' failed, exit status: 1, stdout + stderr:
E> * installing *source* package ‘myPackage’ ...
E> ** using staged installation
E> ** libs
E> clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
E> RcppExports.cpp:9:1: error: unknown type name 'MY_HEADER_INFO'
E> MY_HEADER_INFO read_header();
E> ^
E> 1 error generated.
E> make: *** [RcppExports.o] Error 1
E> ERROR: compilation failed for package ‘myPackage’
E> * removing ‘/private/var/folders/gl/jvj9b0xn34lgq6_h9370p8q80000gn/T/RtmpLKsw0o/devtools_install_1f333d54be59/myPackage’
Stack trace:
1. base:::suppressPackageStartupMessages({ ...
2. base:::withCallingHandlers(expr, packageStartupMessage = function(c) tryInv ...
3. devtools::document(roclets = c("rd", "collate", "namespace"))
4. withr::with_envvar(r_env_vars(), roxygen2::roxygenise(pkg$path, ...
5. base:::force(code)
6. roxygen2::roxygenise(pkg$path, roclets, load_code = load_code)
7. roxygen2:::load_code(base_path)
8. pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
9. pkgbuild::compile_dll(path, quiet = quiet)
10. withr::with_makevars(compiler_flags(TRUE), assignment = "+=", ...
11. withr:::with_envvar(c(R_MAKEVARS_USER = makevars_file), { ...
12. base:::force(code)
13. base:::force(code)
14. pkgbuild:::install_min(path, dest = install_dir, components = "libs", ...
15. pkgbuild:::rcmd_build_tools("INSTALL", c(path, paste("--library=", ...
16. pkgbuild:::with_build_tools(callr::rcmd_safe(..., env = env, ...
17. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE, ...
18. callr:::run_r(options)
19. base:::with(options, with_envvar(env, do.call(processx::run, ...
20. base:::with.default(options, with_envvar(env, do.call(processx::run, ...
21. base:::eval(substitute(expr), data, enclos = parent.frame())
22. base:::eval(substitute(expr), data, enclos = parent.frame())
23. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmd ...
24. base:::force(code)
25. base:::do.call(processx::run, c(list(bin, args = real_cmdargs, ...
26. (function (command = NULL, args = character(), error_on_status = TRUE, ...
27. throw(new_process_error(res, call = sys.call(), echo = echo, ...
x System command 'R' failed, exit status: 1, stdout + stderr:
E> * installing *source* package ‘myPackage’ ...
E> ** using staged installation
E> ** libs
E> clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
E> RcppExports.cpp:9:1: error: unknown type name 'MY_HEADER_INFO'
E> MY_HEADER_INFO read_header();
E> ^
E> 1 error generated.
E> make: *** [RcppExports.o] Error 1
E> ERROR: compilation failed for package ‘myPackage’
E> * removing ‘/private/var/folders/gl/jvj9b0xn34lgq6_h9370p8q80000gn/T/RtmpLKsw0o/devtools_install_1f333d54be59/myPackage’
Execution halted
Exited with status 1.
The following is written to Rcpp_exports:
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// read_header
MY_HEADER_INFO read_header();
RcppExport SEXP _myPackage_read_header() {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = Rcpp::wrap(read_header());
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_myPackage_read_header", (DL_FUNC) &_myPackage_read_header, 0},
{NULL, NULL, 0}
};
RcppExport void R_init_myPackage(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
If I try to modify this file, however, it all gets written over when I call CMD+SHIFT+B.
Other C programs I've written for this same package that return standard data types (e.g., "std::vector") compile without a problem, both when I "source" the code in the Console and when I build them into a package.
I have read through the Rcpp documentation and related vignettes (and even bought Dirk's book!), but I cannot find how to tell the package builder where the definition of MY_HEADER_INFO is located. How do I tell the package compiler where the definition of this file is located?
Thanks!
That look like another instance of a not-entirely-uncommon problem for which we do have a wonderfully simple answer that is somewho less known than it should be.
In short, for a package <pkg> (where <pkg> is an alias for your package name, with lower or undercase as you please. and obviously no < or >) please such struct (or in the C++ case class) or typedef or ... definitions into a file inst/include/<pkg>_types.h (replacing <pkg> with your package name).
If such a file exists, it is automagically included by RcppExports.cpp and you are good to go.
Details are in the Rcpp Attributes vignette, and a few related forms are allowed as well:
src/<pkg>_types.h
src/<pkg>_types.hpp
inst/include/<pkg>_types.h
inst/include/<pkg>_types.hpp
inst/include/<pkg>.h
but inst/include/<pkg>_types.h may be the most commonly used one. One example of using it via src/ is src/RSQLite_types.h. On the other hand, an example of using it in inst/include/ is inst/include/RcppQuantuccia_types.h and another, much larger one in inst/include/RcppGSL_types.h.

How to install Tidyverse on Ubuntu 18.04.3 LTS (Bionic Beaver)?

I'm trying to install Tidyverse on a Ubuntu 18.04.3 LTS (Bionic Beaver) system, preferably in a maintainable way, such that I can execute the code examples in a related book.
I've explored posted questions related to this one, and have found the top or accepted answers did not allow me to install Tidyverse.
Install system packages
Use already compiled binaries
Install cran packages
Install readr without lock
Install system packages (in comments)
Using devtools
So now I am trying to build up an installation procedure from a state where previously-mentioned packages begin uninstalled, which currently does not work but gives a template from which answers to this question can be modifications from.
$ sudo apt-get install libssl-dev libxml2-dev libcurl4-openssl-dev
$ sudo apt-get install r-base-core r-base-dev
$ sudo apt-get install r-cran-curl r-cran-openssl r-cran-xml2
$ R
> install.packages("tidyverse")
Following the above procedure ends with the following as output in the R interactive terminal:
Installing package into ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
==================================================
downloaded 696 KB
* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Warning: S3 methods ‘$.rlang_ctxt_pronoun’, ‘$.rlang_data_pronoun’, ‘$.rlang_fake_data_pronoun’, ‘$<-.quosures’, ‘$<-.rlang_ctxt_pronoun’, ‘$<-.rlang_data_pronoun’, ‘[.quosure’, ‘[.quosures’, ‘[.rlang_data_pronoun’, ‘[.rlang_envs’, ‘[.stack’, ‘[<-.quosures’, ‘[[.quosure’, ‘[[.rlang_ctxt_pronoun’, ‘[[.rlang_data_pronoun’, ‘[[.rlang_fake_data_pronoun’, ‘[[<-.quosures’, ‘[[<-.rlang_ctxt_pronoun’, ‘[[<-.rlang_data_pronoun’, ‘Math.quosure’, ‘Ops.quosure’, ‘Summary.quosure’, ‘as.character.quosure’, ‘as.list.quosures’, ‘c.quosures’, ‘c.rlang_envs’, ‘cnd_footer.default’, ‘cnd_header.default’, ‘conditionMessage.rlang_error’, ‘format.rlang_error’, ‘format.rlang_trace’, ‘length.rlang_ctxt_pronoun’, ‘length.rlang_data_pronoun’, ‘length.rlang_fake_data_pronoun’, ‘mean.quosure’, ‘median.quosure’, ‘names.rlang_ctxt_pronoun’, ‘names.rlang_data_pronoun’, ‘name [... truncated]
Error in namespaceExport(ns, exports) :
undefined exports: !!!, !!, %#%, %#%<-, %|%, %||%, :=, f_env<-, f_lhs<-, f_rhs<-, fn_body<-, fn_env<-, fn_fmls<-, fn_fmls_names<-, .data, UQ, UQS, abort, are_na, arg_match, as_box, as_box_if, as_bytes, as_character, as_closure, as_complex, as_data_mask, as_data_pronoun, as_double, as_env, as_environment, as_function, as_integer, as_label, as_list, as_logical, as_name, as_overscope, as_pairlist, as_quosure, as_quosures, as_string, as_utf8_character, base_env, bytes, bytes_along, bytes_len, call2, call_args, call_args_names, call_depth, call_fn, call_frame, call_inspect, call_modify, call_name, call_ns, call_stack, call_standardise, caller_env, caller_fn, caller_frame, calling, catch_cnd, child_env, chr, chr_along, chr_len, chr_unserialise_unicode, cnd, cnd_body, cnd_entrace, cnd_footer, cnd_header, cnd_message, cnd_muffle, cnd_signal, cnd_type, coerce_class, coerce_type, cpl, cpl_along, cpl_len, ctxt_depth, ctxt_frame, ctxt_stack, current_env, current_fn, current_frame, dbl, dbl_along, dbl_len, done, dots_definitions, dots_list, dots_n, dots_splice, dots_values, duplicate, empty_env, enexpr, enexprs, enquo, enquos, ensym, ensyms, entrace, env, env_bind, env_bind_active, env_bind_exprs, env_bind_fns, env_bind_lazy, env_binding_are_active, env_binding_are_lazy, env_binding_are_locked, env_binding_lock, env_binding_unlock, env_bury, env_clone, env_depth, env_get, env_get_list, env_has, env_inherits, env_is_locked, env_label, env_length, env_lock, env_name, env_names, env_parent, env_parents, env_poke, env_poke_parent, env_print, env_tail, env_unbind, env_unlock, error_cnd, eval_bare, eval_tidy, exec, exiting, expr, expr_deparse, expr_interp, expr_label, expr_name, expr_print, expr_text, exprs, exprs_auto_name, f_env, f_label, f_lhs, f_name, f_rhs, f_text, flatten, flatten_chr, flatten_cpl, flatten_dbl, flatten_if, flatten_int, flatten_lgl, flatten_raw, fn_body, fn_env, fn_fmls, fn_fmls_names, fn_fmls_syms, format_error_bullets, frame_position, friendly_type, get_env, get_expr, global_env, global_frame, has_length, has_name, have_name, inform, inherits_all, inherits_any, inherits_only, int, int_along, int_len, interrupt, invoke, is_atomic, is_attached, is_bare_atomic, is_bare_bytes, is_bare_character, is_bare_double, is_bare_env, is_bare_environment, is_bare_formula, is_bare_integer, is_bare_integerish, is_bare_list, is_bare_logical, is_bare_numeric, is_bare_raw, is_bare_string, is_bare_vector, is_binary_lang, is_bool, is_box, is_bytes, is_call, is_call_stack, is_callable, is_character, is_chr_na, is_closure, is_condition, is_copyable, is_cpl_na, is_dbl_na, is_definition, is_dictionaryish, is_done_box, is_double, is_empty, is_env, is_environment, is_eval_stack, is_expr, is_expression, is_false, is_formula, is_formulaish, is_frame, is_function, is_installed, is_int_na, is_integer, is_integerish, is_interactive, is_lambda, is_lang, is_lgl_na, is_list, is_logical, is_missing, is_na, is_named, is_namespace, is_node, is_node_list, is_null, is_pairlist, is_primitive, is_primitive_eager, is_primitive_lazy, is_quosure, is_quosures, is_raw, is_reference, is_scalar_atomic, is_scalar_bytes, is_scalar_character, is_scalar_double, is_scalar_integer, is_scalar_integerish, is_scalar_list, is_scalar_logical, is_scalar_raw, is_scalar_vector, is_scoped, is_spliced, is_spliced_bare, is_stack, is_string, is_symbol, is_symbolic, is_syntactic_literal, is_true, is_unary_lang, is_vector, is_weakref, is_zap, lang, lang_args, lang_args_names, lang_fn, lang_head, lang_modify, lang_name, lang_standardise, lang_tail, last_error, last_trace, lgl, lgl_along, lgl_len, list2, list_along, list_len, ll, local_bindings, local_interactive, local_options, locally, maybe_missing, message_cnd, missing_arg, modify, mut_attrs, mut_node_caar, mut_node_cadr, mut_node_car, mut_node_cdar, mut_node_cddr, mut_node_cdr, mut_node_tag, na_chr, na_cpl, na_dbl, na_int, na_lgl, names2, new_box, new_call, new_character, new_character_along, new_complex, new_complex_along, new_data_mask, new_definition, new_double, new_double_along, new_environment, new_formula, new_function, new_integer, new_integer_along, new_language, new_list, new_list_along, new_logical, new_logical_along, new_node, new_overscope, new_quosure, new_quosures, new_raw, new_raw_along, new_weakref, node, node_caar, node_cadr, node_car, node_cdar, node_cddr, node_cdr, node_poke_caar, node_poke_cadr, node_poke_car, node_poke_cdar, node_poke_cddr, node_poke_cdr, node_poke_tag, node_tag, ns_env, ns_env_name, ns_imports_env, overscope_clean, overscope_eval_next, pairlist2, parse_expr, parse_exprs, parse_quo, parse_quos, parse_quosure, parse_quosures, peek_option, peek_options, pkg_env, pkg_env_name, prepend, prim_name, push_options, qq_show, quo, quo_expr, quo_get_env, quo_get_expr, quo_is_call, quo_is_lang, quo_is_missing, quo_is_null, quo_is_symbol, quo_is_symbolic, quo_label, quo_name, quo_set_env, quo_set_expr, quo_squash, quo_text, quos, quos_auto_name, raw_along, raw_len, rep_along, rep_named, restarting, return_from, return_to, rst_abort, rst_exists, rst_jump, rst_list, rst_maybe_jump, scoped_bindings, scoped_env, scoped_envs, scoped_interactive, scoped_names, scoped_options, search_env, search_envs, seq2, seq2_along, set_attrs, set_env, set_expr, set_names, signal, splice, squash, squash_chr, squash_cpl, squash_dbl, squash_if, squash_int, squash_lgl, squash_raw, stack_trim, string, switch_class, switch_type, sym, syms, trace_back, trace_length, type_of, unbox, vec_poke_n, vec_poke_range, warn, warning_cnd, with_abort, with_bindings, with_env, with_handlers, with_interactive, with_options, with_restarts, wref_key, wref_value, zap
ERROR: lazy loading failed for package ‘tidyverse’
* removing ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4/tidyverse’
The downloaded source packages are in
‘/tmp/RtmpXT3xFS/downloaded_packages’
Warning message:
In install.packages("tidyverse") :
installation of package ‘tidyverse’ had non-zero exit status
It is clear from the output that the binary matches the checksum, and that the issue is related to exporting what appear to be method names from a namespace. While I am familiar with the general problem of namespace conflicts, I am unsure what is exactly happening here.
I've also tried changing step 5 to install.packages("tidyverse", dependencies = TRUE), which instead gives the following output:
Installing package into ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rex’, ‘covr’, ‘feather’
trying URL 'https://cloud.r-project.org/src/contrib/rex_1.1.2.tar.gz'
Content type 'application/x-gzip' length 89430 bytes (87 KB)
==================================================
downloaded 87 KB
trying URL 'https://cloud.r-project.org/src/contrib/covr_3.4.0.tar.gz'
Content type 'application/x-gzip' length 144119 bytes (140 KB)
==================================================
downloaded 140 KB
trying URL 'https://cloud.r-project.org/src/contrib/feather_0.3.5.tar.gz'
Content type 'application/x-gzip' length 73812 bytes (72 KB)
==================================================
downloaded 72 KB
trying URL 'https://cloud.r-project.org/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
==================================================
downloaded 696 KB
* installing *source* package ‘rex’ ...
** package ‘rex’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Warning: S3 methods ‘[.fseq’, ‘[[.fseq’, ‘print.fseq’ were declared in NAMESPACE but not found
Error in namespaceExport(ns, exports) :
undefined exports: %$%, %<>%, %>%, %T>%, n'est pas, add, and, debug_fseq, debug_pipe, divide_by, divide_by_int, equals, extract, extract2, freduce, functions, inset, inset2, is_greater_than, is_in, is_less_than, is_weakly_greater_than, is_weakly_less_than, mod, multiply_by, multiply_by_matrix, not, or, raise_to_power, set_colnames, set_names, set_rownames, subtract, undebug_fseq, use_series
ERROR: lazy loading failed for package ‘rex’
* removing ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4/rex’
* installing *source* package ‘feather’ ...
** package ‘feather’ successfully unpacked and MD5 sums checked
Platform is little endian. Good.
** libs
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather-read.cpp -o feather-read.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather-types.cpp -o feather-types.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather-write.cpp -o feather-write.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/buffer.cc -o feather/buffer.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/feather-c.cc -o feather/feather-c.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/io.cc -o feather/io.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/metadata.cc -o feather/metadata.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/reader.cc -o feather/reader.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/status.cc -o feather/status.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/types.cc -o feather/types.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I. -I"/home/galen/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c feather/writer.cc -o feather/writer.o
ar rcs libfeather.a feather/buffer.o feather/feather-c.o feather/io.o feather/metadata.o feather/reader.o feather/status.o feather/types.o feather/writer.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o feather.so RcppExports.o feather-read.o feather-types.o feather-write.o -L. -lfeather -L/usr/lib/R/lib -lR
installing to /home/galen/R/x86_64-pc-linux-gnu-library/3.4/feather/libs
** R
** inst
** preparing package for lazy loading
Warning: S3 methods ‘.DollarNames.C++Object’, ‘.DollarNames.Module’, ‘print.bytes’, ‘format.Rcpp_stack_trace’, ‘str.Rcpp_stack_trace’, ‘print.Rcpp_stack_trace’ were declared in NAMESPACE but not found
Error in namespaceExport(ns, exports) :
undefined exports: Module, Rcpp.package.skeleton, populate, loadRcppModules, setRcppClass, loadRcppClass, loadModule, cppFunction, exposeClass, evalCpp, sourceCpp, compileAttributes, registerPlugin, RcppLdFlags, LdFlags, demangle, sizeof, cpp_object_initializer, cpp_object_dummy, Rcpp.plugin.maker, getRcppVersion
ERROR: lazy loading failed for package ‘feather’
* removing ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4/feather’
* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Warning: S3 methods ‘$.rlang_ctxt_pronoun’, ‘$.rlang_data_pronoun’, ‘$.rlang_fake_data_pronoun’, ‘$<-.quosures’, ‘$<-.rlang_ctxt_pronoun’, ‘$<-.rlang_data_pronoun’, ‘[.quosure’, ‘[.quosures’, ‘[.rlang_data_pronoun’, ‘[.rlang_envs’, ‘[.stack’, ‘[<-.quosures’, ‘[[.quosure’, ‘[[.rlang_ctxt_pronoun’, ‘[[.rlang_data_pronoun’, ‘[[.rlang_fake_data_pronoun’, ‘[[<-.quosures’, ‘[[<-.rlang_ctxt_pronoun’, ‘[[<-.rlang_data_pronoun’, ‘Math.quosure’, ‘Ops.quosure’, ‘Summary.quosure’, ‘as.character.quosure’, ‘as.list.quosures’, ‘c.quosures’, ‘c.rlang_envs’, ‘cnd_footer.default’, ‘cnd_header.default’, ‘conditionMessage.rlang_error’, ‘format.rlang_error’, ‘format.rlang_trace’, ‘length.rlang_ctxt_pronoun’, ‘length.rlang_data_pronoun’, ‘length.rlang_fake_data_pronoun’, ‘mean.quosure’, ‘median.quosure’, ‘names.rlang_ctxt_pronoun’, ‘names.rlang_data_pronoun’, ‘name [... truncated]
Error in namespaceExport(ns, exports) :
undefined exports: !!!, !!, %#%, %#%<-, %|%, %||%, :=, f_env<-, f_lhs<-, f_rhs<-, fn_body<-, fn_env<-, fn_fmls<-, fn_fmls_names<-, .data, UQ, UQS, abort, are_na, arg_match, as_box, as_box_if, as_bytes, as_character, as_closure, as_complex, as_data_mask, as_data_pronoun, as_double, as_env, as_environment, as_function, as_integer, as_label, as_list, as_logical, as_name, as_overscope, as_pairlist, as_quosure, as_quosures, as_string, as_utf8_character, base_env, bytes, bytes_along, bytes_len, call2, call_args, call_args_names, call_depth, call_fn, call_frame, call_inspect, call_modify, call_name, call_ns, call_stack, call_standardise, caller_env, caller_fn, caller_frame, calling, catch_cnd, child_env, chr, chr_along, chr_len, chr_unserialise_unicode, cnd, cnd_body, cnd_entrace, cnd_footer, cnd_header, cnd_message, cnd_muffle, cnd_signal, cnd_type, coerce_class, coerce_type, cpl, cpl_along, cpl_len, ctxt_depth, ctxt_frame, ctxt_stack, current_env, current_fn, current_frame, dbl, dbl_along, dbl_len, done, dots_definitions, dots_list, dots_n, dots_splice, dots_values, duplicate, empty_env, enexpr, enexprs, enquo, enquos, ensym, ensyms, entrace, env, env_bind, env_bind_active, env_bind_exprs, env_bind_fns, env_bind_lazy, env_binding_are_active, env_binding_are_lazy, env_binding_are_locked, env_binding_lock, env_binding_unlock, env_bury, env_clone, env_depth, env_get, env_get_list, env_has, env_inherits, env_is_locked, env_label, env_length, env_lock, env_name, env_names, env_parent, env_parents, env_poke, env_poke_parent, env_print, env_tail, env_unbind, env_unlock, error_cnd, eval_bare, eval_tidy, exec, exiting, expr, expr_deparse, expr_interp, expr_label, expr_name, expr_print, expr_text, exprs, exprs_auto_name, f_env, f_label, f_lhs, f_name, f_rhs, f_text, flatten, flatten_chr, flatten_cpl, flatten_dbl, flatten_if, flatten_int, flatten_lgl, flatten_raw, fn_body, fn_env, fn_fmls, fn_fmls_names, fn_fmls_syms, format_error_bullets, frame_position, friendly_type, get_env, get_expr, global_env, global_frame, has_length, has_name, have_name, inform, inherits_all, inherits_any, inherits_only, int, int_along, int_len, interrupt, invoke, is_atomic, is_attached, is_bare_atomic, is_bare_bytes, is_bare_character, is_bare_double, is_bare_env, is_bare_environment, is_bare_formula, is_bare_integer, is_bare_integerish, is_bare_list, is_bare_logical, is_bare_numeric, is_bare_raw, is_bare_string, is_bare_vector, is_binary_lang, is_bool, is_box, is_bytes, is_call, is_call_stack, is_callable, is_character, is_chr_na, is_closure, is_condition, is_copyable, is_cpl_na, is_dbl_na, is_definition, is_dictionaryish, is_done_box, is_double, is_empty, is_env, is_environment, is_eval_stack, is_expr, is_expression, is_false, is_formula, is_formulaish, is_frame, is_function, is_installed, is_int_na, is_integer, is_integerish, is_interactive, is_lambda, is_lang, is_lgl_na, is_list, is_logical, is_missing, is_na, is_named, is_namespace, is_node, is_node_list, is_null, is_pairlist, is_primitive, is_primitive_eager, is_primitive_lazy, is_quosure, is_quosures, is_raw, is_reference, is_scalar_atomic, is_scalar_bytes, is_scalar_character, is_scalar_double, is_scalar_integer, is_scalar_integerish, is_scalar_list, is_scalar_logical, is_scalar_raw, is_scalar_vector, is_scoped, is_spliced, is_spliced_bare, is_stack, is_string, is_symbol, is_symbolic, is_syntactic_literal, is_true, is_unary_lang, is_vector, is_weakref, is_zap, lang, lang_args, lang_args_names, lang_fn, lang_head, lang_modify, lang_name, lang_standardise, lang_tail, last_error, last_trace, lgl, lgl_along, lgl_len, list2, list_along, list_len, ll, local_bindings, local_interactive, local_options, locally, maybe_missing, message_cnd, missing_arg, modify, mut_attrs, mut_node_caar, mut_node_cadr, mut_node_car, mut_node_cdar, mut_node_cddr, mut_node_cdr, mut_node_tag, na_chr, na_cpl, na_dbl, na_int, na_lgl, names2, new_box, new_call, new_character, new_character_along, new_complex, new_complex_along, new_data_mask, new_definition, new_double, new_double_along, new_environment, new_formula, new_function, new_integer, new_integer_along, new_language, new_list, new_list_along, new_logical, new_logical_along, new_node, new_overscope, new_quosure, new_quosures, new_raw, new_raw_along, new_weakref, node, node_caar, node_cadr, node_car, node_cdar, node_cddr, node_cdr, node_poke_caar, node_poke_cadr, node_poke_car, node_poke_cdar, node_poke_cddr, node_poke_cdr, node_poke_tag, node_tag, ns_env, ns_env_name, ns_imports_env, overscope_clean, overscope_eval_next, pairlist2, parse_expr, parse_exprs, parse_quo, parse_quos, parse_quosure, parse_quosures, peek_option, peek_options, pkg_env, pkg_env_name, prepend, prim_name, push_options, qq_show, quo, quo_expr, quo_get_env, quo_get_expr, quo_is_call, quo_is_lang, quo_is_missing, quo_is_null, quo_is_symbol, quo_is_symbolic, quo_label, quo_name, quo_set_env, quo_set_expr, quo_squash, quo_text, quos, quos_auto_name, raw_along, raw_len, rep_along, rep_named, restarting, return_from, return_to, rst_abort, rst_exists, rst_jump, rst_list, rst_maybe_jump, scoped_bindings, scoped_env, scoped_envs, scoped_interactive, scoped_names, scoped_options, search_env, search_envs, seq2, seq2_along, set_attrs, set_env, set_expr, set_names, signal, splice, squash, squash_chr, squash_cpl, squash_dbl, squash_if, squash_int, squash_lgl, squash_raw, stack_trim, string, switch_class, switch_type, sym, syms, trace_back, trace_length, type_of, unbox, vec_poke_n, vec_poke_range, warn, warning_cnd, with_abort, with_bindings, with_env, with_handlers, with_interactive, with_options, with_restarts, wref_key, wref_value, zap
ERROR: lazy loading failed for package ‘tidyverse’
* removing ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4/tidyverse’
ERROR: dependency ‘rex’ is not available for package ‘covr’
* removing ‘/home/galen/R/x86_64-pc-linux-gnu-library/3.4/covr’
The downloaded source packages are in
‘/tmp/RtmpGxNQPL/downloaded_packages’
Warning messages:
1: In install.packages("tidyverse", dependencies = TRUE) :
installation of package ‘rex’ had non-zero exit status
2: In install.packages("tidyverse", dependencies = TRUE) :
installation of package ‘feather’ had non-zero exit status
3: In install.packages("tidyverse", dependencies = TRUE) :
installation of package ‘tidyverse’ had non-zero exit status
4: In install.packages("tidyverse", dependencies = TRUE) :
installation of package ‘covr’ had non-zero exit status
Given the above context, how can I change the above installation procedure such that it is easily maintained with package managers?
Additional Notes:
RStudio is not installed on my system.
R version information after installation with apt-get:
R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
You should probably first update R (currently it is version 3.6.1-2). The documentation on how to set new repositories for R in Ubuntu is here: https://cran.r-project.org/bin/linux/ubuntu/

Having trouble installing R package httpuv

I am using R 3.3.3 on Debian/Linux 8 and I am having trouble installing the package httpuv, which is a dependency for another package I want to use. The installing error message is shown below. It seems like there are problems with libuv, but I am not sure about this.
How can I figure out where the problem is and how to fix it?
> install.packages("httpuv")
Installing package into ‘/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.cnr.berkeley.edu/src/contrib/httpuv_1.5.1.tar.gz'
Content type 'unknown' length 1758514 bytes (1.7 MB)
==================================================
downloaded 1.7 MB
* installing *source* package ‘httpuv’ ...
** package ‘httpuv’ successfully unpacked and MD5 sums checked
** libs
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports-legacy.cpp -o RcppExports-legacy.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c callback.cpp -o callback.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c callbackqueue.cpp -o callbackqueue.o
In file included from libuv/include/uv.h:62:0,
from thread.h:4,
from tqueue.h:7,
from callbackqueue.h:4,
from callbackqueue.cpp:1:
libuv/include/uv/unix.h:103:28: error: ‘sem_t’ does not name a type
# define UV_PLATFORM_SEM_T sem_t
^
libuv/include/uv/unix.h:135:9: note: in expansion of macro ‘UV_PLATFORM_SEM_T’
typedef UV_PLATFORM_SEM_T uv_sem_t;
^
In file included from thread.h:4:0,
from tqueue.h:7,
from callbackqueue.h:4,
from callbackqueue.cpp:1:
libuv/include/uv.h:1562:27: error: ‘uv_sem_t’ was not declared in this scope
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1562:37: error: ‘sem’ was not declared in this scope
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1562:42: error: expected primary-expression before ‘unsigned’
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1562:60: error: expression list treated as compound expression in initializer [-fpermissive]
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1563:31: error: variable or field ‘uv_sem_destroy’ declared void
UV_EXTERN void uv_sem_destroy(uv_sem_t* sem);
^
libuv/include/uv.h:1563:31: error: ‘uv_sem_t’ was not declared in this scope
libuv/include/uv.h:1563:41: error: ‘sem’ was not declared in this scope
UV_EXTERN void uv_sem_destroy(uv_sem_t* sem);
^
libuv/include/uv.h:1564:28: error: variable or field ‘uv_sem_post’ declared void
UV_EXTERN void uv_sem_post(uv_sem_t* sem);
^
libuv/include/uv.h:1564:28: error: ‘uv_sem_t’ was not declared in this scope
libuv/include/uv.h:1564:38: error: ‘sem’ was not declared in this scope
UV_EXTERN void uv_sem_post(uv_sem_t* sem);
^
libuv/include/uv.h:1565:28: error: variable or field ‘uv_sem_wait’ declared void
UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
^
libuv/include/uv.h:1565:28: error: ‘uv_sem_t’ was not declared in this scope
libuv/include/uv.h:1565:38: error: ‘sem’ was not declared in this scope
UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
^
libuv/include/uv.h:1566:30: error: ‘uv_sem_t’ was not declared in this scope
UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
^
libuv/include/uv.h:1566:40: error: ‘sem’ was not declared in this scope
UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
^
/usr/lib/R/etc/Makeconf:141: recipe for target 'callbackqueue.o' failed
make: *** [callbackqueue.o] Error 1
ERROR: compilation failed for package ‘httpuv’
* removing ‘/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/httpuv’
The downloaded source packages are in
‘/tmp/Rtmpqg62zZ/downloaded_packages’
Warning message:
In install.packages("httpuv") :
installation of package ‘httpuv’ had non-zero exit status
I had the same error and tried several installations to make it work:
Install Java jre and jdk
Install devtools install.packages("devtools")
In the console, run .libPaths() to see where packages are installed.
Make sure to get full permission from your library directory
Run devtools::install_github("rstudio/httpuv", lib = "directory from 3.") in the console.

R Rstudio problems installing packages mapdeck and googlePolylines

When I try to install the package mapdeck in Rstudio, it appears a message in the console saying that I need to install the package googlePolylines, but I can't install this one. The error that appears in the console is the following:
package ‘googlePolylines’ successfully unpacked and MD5 sums checked
libs
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I../inst/include -I"/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I"/usr/lib64/R/library/BH/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I../inst/include -I"/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I"/usr/lib64/R/library/BH/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c encode.cpp -o encode.o
encode.cpp: In function ‘void encode_vector(std::ostringstream&, std::ostringstream&, Rcpp::List, Rcpp::CharacterVector&, int)’:
encode.cpp:175: error: conversion from ‘Rcpp::internal::generic_proxy<19, Rcpp::PreserveStorage>’ to ‘double’ is ambiguous
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:73: note: candidates are: Rcpp::internal::generic_proxy::operator int() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:72: note: Rcpp::internal::generic_proxy::operator bool() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:67: note: Rcpp::internal::generic_proxy::operator U() const [with U = double, int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
encode.cpp:176: error: conversion from ‘Rcpp::internal::generic_proxy<19, Rcpp::PreserveStorage>’ to ‘double’ is ambiguous
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:73: note: candidates are: Rcpp::internal::generic_proxy::operator int() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:72: note: Rcpp::internal::generic_proxy::operator bool() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:67: note: Rcpp::internal::generic_proxy::operator U() const [with U = double, int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
make: *** [encode.o] Error 1
ERROR: compilation failed for package ‘googlePolylines’
removing ‘/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/googlePolylines’
Warning in install.packages :
installation of package ‘googlePolylines’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpwwAJSv/downloaded_packages’
I haven't found almost any information about these two packages, so I would appreciate if anyone could help me, thank you.

Resources