[SOLVED] R packages not installing

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] R packages not installing

Postby RogerJ » Oct 19th, '15, 20:19

Hello,

I'm trying out Mageia 5. I use R-base a lot. I've not been able to install any R packages with R-base on Mageia 5 however.

All R packages and their dependencies are getting a non-zero status exit with "make: command not found" but no other explanation. I've installed gc-gfortran, lib64lapack, liblapck3 and Eigen2 but no luck. I think there may be an issue with stack security but I'm getting way out of my depth here. This is an example of an error message in R-base on a failed installation of the R package Rcpp:

Code: Select all
g++ -I/usr/lib64/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC  -c Date.cpp -o Date.o
make: g++: Command not found
/usr/lib64/R/etc/Makeconf:140: recipe for target 'Date.o' failed
make: *** [Date.o] Error 127
ERROR: compilation failed for package ‘Rcpp’


Any suggestions as to how to resolve this would be much appreciated.
Last edited by doktor5000 on Oct 10th, '21, 14:08, edited 2 times in total.
Reason: marked solved, placed command-output in between [CODE]-tags for better readability ;)
RogerJ
 
Posts: 6
Joined: May 16th, '12, 19:40

Re: R packages not installing

Postby doktor5000 » Oct 19th, '15, 21:15

RogerJ wrote:make: g++: Command not found

You're missing a C++ compiler. Just install task-c++-devel and you should be good to go. If you only want to install the one missing package, install gcc-c++
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

[SOLVED] R packages not installing

Postby RogerJ » Oct 20th, '15, 14:15

Thanks doktor 5000, that worked. For the benefit of anyone else with this query, are task-c++-devel and gc-gfortran the go to compilers for running these sort of packages?
RogerJ
 
Posts: 6
Joined: May 16th, '12, 19:40

Re: R packages not installing

Postby doktor5000 » Oct 20th, '15, 20:07

task-c++-devel is a so-called metapackage, it does not contain any files but pulls in dependencies to get the relevant packages for C++ development. It pulls the following packages:

Code: Select all
[doktor5000@Mageia5]─[20:00:35]─[~] urpmq --requires task-c++-devel
--requires behaviour changed, use --requires-recursive to get the old behaviour
gcc-c++
libstdc++-devel
task-c-devel

So it in turn pulls in task-c-devel (which is for C development) which pulls the following packages:
Code: Select all
[doktor5000@Mageia5]─[20:00:39]─[~] urpmq --requires task-c-devel
--requires behaviour changed, use --requires-recursive to get the old behaviour
autoconf
automake
binutils
bison
byacc
ctags
diffutils
flex
gcc
gcc-cpp
glib2-devel
glibc-devel
libslang-devel
libtool
libz-devel
m4
make
ncurses-devel
patch
texinfo


No clue about gcc-gfortran but that is only an addon for gcc (the GNU C Compiler) which adds Fortran 95 support.

Regarding compilers, from the R FAQ:
https://cran.r-project.org/doc/FAQ/R-FAQ.html wrote:Note that you need a FORTRAN compiler or perhaps f2c in addition to a C compiler to build R.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: R packages not installing

Postby daniewicz » Oct 25th, '15, 06:14

For the benefit of anyone else with this query, are task-c++-devel and gc-gfortran the go to compilers for running these sort of packages?


With regard to gc-gfortran: yes.
The dude abides.
User avatar
daniewicz
 
Posts: 201
Joined: Feb 10th, '13, 03:37

Re: R packages not installing

Postby christianvl » Oct 9th, '21, 20:14

I've just found this post troubleshooting my R/Rstudio install on Mageia 8. Installing the "task-c++" solved my problems with R. I was just wondering, I know it is not required to run R, but ir is to install any R packages. Shouldn't it be a dependency for R-base / RStudio?
christianvl
 
Posts: 12
Joined: Feb 14th, '19, 19:11

Re: R packages not installing

Postby christianvl » Oct 9th, '21, 20:39

Hum... maybe I'm suffering from a "premature celebration" here. I'm getting errors about system dependencies that I'm not quite sure...

Code: Select all
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/christian/R/x86_64-mageia-linux-gnu-library/4.0/curl’
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
--------------------------- [ANTICONF] --------------------------------
Configuration failed because openssl was not found. Try installing:
 * deb: libssl-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev (Solaris)
 * brew: openssl@1.1 (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
christianvl
 
Posts: 12
Joined: Feb 14th, '19, 19:11

Re: R packages not installing

Postby doktor5000 » Oct 10th, '21, 01:11

You should probably install the respective devel packages. As root
Code: Select all
urpmi curl-devel openssl-devel
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: R packages not installing

Postby christianvl » Oct 10th, '21, 05:54

Good doktor5000, nailed it. Thank you very much!
christianvl
 
Posts: 12
Joined: Feb 14th, '19, 19:11


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron