Unable to install tidyverse, R 4.0 Ubuntu 18.04

I am trying to install tidyverse and I am getting a lot of errors. I think I managed to get rid of some... but for the remaining, I cannot find a way or information on how to fix them.

The OS is Ubuntu 18.04, using R-Studio 1.3.1056. I read other posts of a similar nature and most had their problems solved by upgrading R. I have done this and my R version is now 4.0.2. But when I tried again to install tidyverse, it still did not work.

The log is very long, but the part starting with errors while installing tidyverse is below

make[1]: Leaving directory '/tmp/RtmpA85hjI/R.INSTALL72fb3fee2f87/Matrix/src/SuiteSparse_config'
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Matrix.so CHMfactor.o Csparse.o TMatrix_as.o Tsparse.o init.o Mutils.o chm_common.o cs.o cs_utils.o dense.o dgCMatrix.o dgTMatrix.o dgeMatrix.o dpoMatrix.o dppMatrix.o dsCMatrix.o dsyMatrix.o dspMatrix.o dtCMatrix.o dtTMatrix.o dtrMatrix.o dtpMatrix.o factorizations.o ldense.o lgCMatrix.o sparseQR.o abIndex.o CHOLMOD.a COLAMD.a AMD.a SuiteSparse_config.a -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
installing to /home/zz/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-Matrix/00new/Matrix/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error: package ‘lattice’ was installed before R 4.0.0: please re-install it
Execution halted
ERROR: lazy loading failed for package ‘Matrix’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/Matrix’
Warning in install.packages :
  installation of package ‘Matrix’ had non-zero exit status
* installing *source* package ‘tidyr’ ...
** package ‘tidyr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include'    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-ttHamR/r-base-4.0.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cpp11.cpp -o cpp11.o
cpp11.cpp: In function ‘SEXPREC* _tidyr_fillDown(SEXP)’:
cpp11.cpp:10:43: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(fillDown(cpp11::unmove(cpp11::as_cpp<SEXP>(x))));
                                           ^~~~~~
cpp11.cpp: In function ‘SEXPREC* _tidyr_fillUp(SEXP)’:
cpp11.cpp:17:41: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(fillUp(cpp11::unmove(cpp11::as_cpp<SEXP>(x))));
                                         ^~~~~~
cpp11.cpp: In function ‘SEXPREC* _tidyr_melt_dataframe(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
cpp11.cpp:24:49: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                 ^~~~~~
cpp11.cpp:24:104: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                        ^~~~~~
cpp11.cpp:24:155: error: use of deleted function ‘cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> cpp11::as_cpp(SEXP) [with T = const cpp11::r_vector<int>&; cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> = const cpp11::r_vector<int>&; SEXP = SEXPREC*]’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                           ^
In file included from /home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include/cpp11.hpp:5:0,
                 from /home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:4:
/home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include/cpp11/as.hpp:180:53: note: declared here
 enable_if_t<!std::is_same<decay_t<T>, T>::value, T> as_cpp(SEXP from) = delete;
                                                     ^~~~~~
cpp11.cpp:24:166: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                      ^~~~~~
cpp11.cpp:24:222: error: use of deleted function ‘cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> cpp11::as_cpp(SEXP) [with T = const cpp11::r_vector<int>&; cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> = const cpp11::r_vector<int>&; SEXP = SEXPREC*]’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                              ^
In file included from /home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include/cpp11.hpp:5:0,
                 from /home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:4:
/home/zz/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include/cpp11/as.hpp:180:53: note: declared here
 enable_if_t<!std::is_same<decay_t<T>, T>::value, T> as_cpp(SEXP from) = delete;
                                                     ^~~~~~
cpp11.cpp:24:233: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                                         ^~~~~~
cpp11.cpp:24:294: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                                                                                                      ^~~~~~
cpp11.cpp:24:352: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                                                                                                                                                                ^~~~~~
cpp11.cpp:24:409: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                                                                                                                                                                                                                         ^~~~~~
cpp11.cpp:24:463: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^~~~~~
cpp11.cpp:24:514: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^~~~~~
cpp11.cpp: In function ‘SEXPREC* _tidyr_simplifyPieces(SEXP, SEXP, SEXP)’:
cpp11.cpp:31:49: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(simplifyPieces(cpp11::unmove(cpp11::as_cpp<cpp11::list>(pieces)), cpp11::unmove(cpp11::as_cpp<int>(p)), cpp11::unmove(cpp11::as_cpp<bool>(fillLeft))));
                                                 ^~~~~~
cpp11.cpp:31:100: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(simplifyPieces(cpp11::unmove(cpp11::as_cpp<cpp11::list>(pieces)), cpp11::unmove(cpp11::as_cpp<int>(p)), cpp11::unmove(cpp11::as_cpp<bool>(fillLeft))));
                                                                                                    ^~~~~~
cpp11.cpp:31:138: error: ‘unmove’ is not a member of ‘cpp11’
     return cpp11::as_sexp(simplifyPieces(cpp11::unmove(cpp11::as_cpp<cpp11::list>(pieces)), cpp11::unmove(cpp11::as_cpp<int>(p)), cpp11::unmove(cpp11::as_cpp<bool>(fillLeft))));
                                                                                                                                          ^~~~~~
/usr/lib/R/etc/Makeconf:176: recipe for target 'cpp11.o' failed
make: *** [cpp11.o] Error 1
ERROR: compilation failed for package ‘tidyr’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/tidyr’
Warning in install.packages :
  installation of package ‘tidyr’ had non-zero exit status
ERROR: dependencies ‘nlme’, ‘Matrix’ are not available for package ‘mgcv’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/mgcv’
Warning in install.packages :
  installation of package ‘mgcv’ had non-zero exit status
ERROR: dependency ‘tidyr’ is not available for package ‘broom’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependency ‘mgcv’ is not available for package ‘ggplot2’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘tidyr’ are not available for package ‘modelr’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/modelr’
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘ggplot2’, ‘modelr’, ‘tidyr’ are not available for package ‘tidyverse’
* removing ‘/home/zz/R/x86_64-pc-linux-gnu-library/4.0/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpWlUmtn/downloaded_packages’

Thanks!

1 Like

There is a problem with the latest update of cpp11. This has been reported to the developers, and apparently the package has just been updated, it might take some time until it's functional again (hours to a few days). See e.g. here or there.

1 Like

Thank you, following the instructions on that link my problem is fixed.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.