2

When trying to install some packages such Rcmdr or factoextra while on R in terminal (after upgrade to R 4.0.0 on Archlabs) the following errors shows up:

* installing *source* package ‘SparseM’ ...
** package ‘SparseM’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2  -c bckslv.f -o bckslv.o
/usr/local/bin/gfortran: /usr/local/bin/gfortran: cannot execute binary file
make: *** [/usr/lib64/R/etc/Makeconf:190: bckslv.o] Error 126
ERROR: compilation failed for package ‘SparseM’
* removing ‘/usr/lib/R/library/SparseM’

and this one :

* installing *source* package ‘readr’ ...
** package ‘readr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/include/R/" -DNDEBUG  -I'/usr/lib/R/library/Rcpp/include' -I'/usr/lib/R/library/BH/include' -D_FORTIFY_SOURCE=2  -I. -Ircon -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c Collector.cpp -o Collector.o
In file included from /usr/lib/R/library/Rcpp/include/Rcpp.h:77,
                 from Collector.cpp:1:
/usr/lib/R/library/Rcpp/include/Rcpp/Rmath.h: In function ‘double R::pythag(double, double)’:
/usr/lib/R/library/Rcpp/include/Rcpp/Rmath.h:222:57: error: ‘::Rf_pythag’ has not been declared; did you mean ‘pythag’?
  222 |     inline double pythag(double a, double b) { return ::Rf_pythag(a, b); }
      |                                                         ^~~~~~~~~
      |                                                         pythag
make: *** [/usr/lib64/R/etc/Makeconf:176: Collector.o] Error 1

then followed by a bunch of

ERROR: dependencies ‘dendextend’, ‘FactoMineR’, ‘ggpubr’, ‘ggrepel’, ‘tidyr’ are not available for package ‘factoextra’
* removing ‘/usr/lib/R/library/factoextra’

following each dependencies produces the same errors with different new dependencies.

P.S: I'm a normie so please bear with me.

francescalus
  • 30,576
  • 16
  • 61
  • 96
hasn
  • 29
  • 1
  • I'm not sure what Archlabs is but I do know that R4.0.0 is a couple of years old, so you need to be making sure that your versions are all from that era in the past. Since you don't mention anything about this critical fact, I'm guessing you have version-related incompatibilities. – IRTFM Jun 08 '22 at 19:55

1 Answers1

0

I had a similar error while installing 'ape'. For me it worked to reinstall the current version of the 'Rcpp' package:

install.packages('Rcpp')

Hope it works for you too !