1

Multiple errors containing "gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG" when trying to install any package. Tried reinstalling R (4.0.3), changing gcc (9.3.0) directory, changing .libPaths(). Nothing worked. Any ideas?

Error Log:

When running install.packages("lme4", dependencies = TRUE, install_opts = '--no-lock'), such errors follow each dependency installation attempt:

(...) 
trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-26.tar.gz'
Content type 'application/x-gzip' length 3297635 bytes (3.1 MB)
==================================================
downloaded 3.1 MB

ERROR: failed to lock directory ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0’ for modifying
Try removing ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-matrixStats’
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
** using staged installation
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=gnu++11 accepts -g... (cached) yes
checking whether we have a suitable tempdir... /tmp
checking whether R CMD SHLIB can already compile programs using OpenMP... yes
checking LAPACK_LIBS... system LAPACK found
configure: creating ./config.status
config.status: creating inst/include/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/username/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include'   -I../inst/include  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppArmadillo.cpp -o RcppArmadillo.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/username/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include'   -I../inst/include  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -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'/home/username/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include'   -I../inst/include  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fastLm.cpp -o fastLm.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
installing to /home/username/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-RcppArmadillo/00new/RcppArmadillo/libs
** 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 from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (RcppArmadillo)
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c altrep-rle.c -o altrep-rle.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c arg-counter.c -o arg-counter.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c arg.c -o arg.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c bind.c -o bind.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c c-unchop.c -o c-unchop.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c c.c -o c.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c callables.c -o callables.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cast-bare.c -o cast-bare.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cast-dispatch.c -o cast-dispatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cast.c -o cast.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c compare.c -o compare.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c complete.c -o complete.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c conditions.c -o conditions.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c dictionary.c -o dictionary.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c dim.c -o dim.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c equal.c -o equal.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fields.c -o fields.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fill.c -o fill.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c group.c -o group.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c growable.c -o growable.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c hash.c -o hash.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c names.c -o names.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c order-groups.c -o order-groups.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c order-radix.c -o order-radix.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c order-sortedness.c -o order-sortedness.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c order-truelength.c -o order-truelength.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c poly-op.c -o poly-op.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c proxy-restore.c -o proxy-restore.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c proxy.c -o proxy.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c ptype2-dispatch.c -o ptype2-dispatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c rep.c -o rep.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c runs.c -o runs.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c shape.c -o shape.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c size-common.c -o size-common.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c size.c -o size.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c slice-array.c -o slice-array.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c slice-assign-array.c -o slice-assign-array.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c slice-assign.c -o slice-assign.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c slice-chop.c -o slice-chop.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c slice.c -o slice.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c split.c -o split.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c subscript-loc.c -o subscript-loc.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c subscript.c -o subscript.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c translate.c -o translate.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type-data-frame.c -o type-data-frame.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type-date-time.c -o type-date-time.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type-factor.c -o type-factor.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type-info.c -o type-info.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type-tibble.c -o type-tibble.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type.c -o type.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c type2.c -o type2.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c typeof2-s3.c -o typeof2-s3.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c typeof2.c -o typeof2.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c unspecified.c -o unspecified.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c utils-dispatch.c -o utils-dispatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c utils-rlang.c -o utils-rlang.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c utils.c -o utils.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c version.c -o version.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o vctrs.so altrep-rle.o arg-counter.o arg.o bind.o c-unchop.o c.o callables.o cast-bare.o cast-dispatch.o cast.o compare.o complete.o conditions.o dictionary.o dim.o equal.o fields.o fill.o group.o growable.o hash.o init.o names.o order-groups.o order-radix.o order-sortedness.o order-truelength.o poly-op.o proxy-restore.o proxy.o ptype2-dispatch.o rep.o runs.o shape.o size-common.o size.o slice-array.o slice-assign-array.o slice-assign.o slice-chop.o slice.o split.o subscript-loc.o subscript.o translate.o type-data-frame.o type-date-time.o type-factor.o type-info.o type-tibble.o type.o type2.o typeof2-s3.o typeof2.o unspecified.o utils-dispatch.o utils-rlang.o utils.o version.o -L/usr/lib/R/lib -lR
(...)
gnev
  • 13
  • 3
  • Can you please share the full error log? You might also want to try using a virtualenv to make sure it isn't a dependency conflict https://stackoverflow.com/a/35017811/620699 – RayB Dec 10 '20 at 23:27
  • @RayB, I've added the error log to my original question. Thanks for taking your time. – gnev Dec 11 '20 at 00:18
  • Hi @gnev and welcome to StackOverflow. I fear you are overcomplicating this, see my answer now which may help you. – Dirk Eddelbuettel Dec 11 '20 at 00:38

1 Answers1

2

Why would you install lme4 from source?

Debian and Ubuntu came with several hundred packages you can install directly, just do

sudo apt update                # refresh indinces
sudo apt install r-cran-lme4

Apart from this, you have access to over 4500 additional r-cran-* packages of CRAN via the PPA by Michael Rutter: c2d4u4+. See the recommended README for Ubuntu at CRAN.

Lastly, and in a more narrow sense, this of course also works directly. Note that you explicitly gave the option install_opts = '--no-lock' (why? I have never seen it recommended anywhere ...) which then yielded the error

ERROR: failed to lock directory ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0’ for modifying
Try removing ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-matrixStats’

you could address by removing the lock as it states.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725