Error compiling R 4.1 package on Debian-based linux

Asked

Viewed 29 times

-1

I am trying to install/compile R-project software, I haven’t been succeeding. Debian-based linux distro.

Follow the steps I’ve taken:

1- I downloaded the package R-4.1.1.tar. gz on the link: https://cran.r-project.org/

2- unpacked with the command : tar -zxvf R-4.1.1.tar.gz

3- read the README and INSTALL files

4- followed the commands indicated by the INSTALL file

5- first command: ./configure

where in this command appears the following :

checking host system type... x86_64-pc-linux-gnu
loading site script './config.site'
loading build-specific script './config.site'
checking for pwd... /usr/bin/pwd
checking whether builddir is srcdir... yes
checking whether ln -s works... yes
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for sed... /usr/bin/sed
checking for which... /usr/bin/which
checking for less... /usr/bin/less
checking for gtar... no
checking for gnutar... no
checking for tar... /usr/bin/tar
checking for tex... no
checking for pdftex... no
configure: WARNING: you cannot build PDF versions of the R manuals
checking for pdflatex... no
configure: WARNING: you cannot build PDF versions of vignettes and help pages
checking for makeindex... no
checking for texi2any... no
configure: WARNING: you cannot build info or HTML versions of the R manuals
checking for texi2dvi... no
checking for kpsewhich... no
checking for latex inconsolata package... checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for gzip... /usr/bin/gzip
checking for bzip2... /usr/bin/bzip2
checking for firefox... /usr/bin/firefox
using default browser ... /usr/bin/firefox
checking for acroread... no
checking for acroread4... no
checking for xdg-open... /usr/bin/xdg-open
checking for working aclocal... missing
checking for working autoconf... missing
checking for working autoheader... missing
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for notangle... false
checking for realpath... /usr/bin/realpath
checking for pkg-config... /usr/bin/pkg-config
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to run the C preprocessor... gcc -E
looking for a modern Fortran compiler
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking for nagfor... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking whether we are using the GNU Fortran compiler... no
checking whether  accepts -g... no
configure: error: No Fortran compiler found ```

6- I’ve noticed the following commands:

sudo apt clean && sudo apt update
sudo apt install build-essential
./configure –prefix=/usr/local –with-slang=/goodies/lib

7- nothing solved

  • 1

    Hi @Ulysses, I won’t be able to help you because I don’t use R or have never tried to compile it. But by accessing the link you posted, I found this https://cran.r-project.org/bin/linux/debian/ . To try to help you clarify your question further for the community to understand your problem. You tried to install by traditional means (apt) ? - Is there a reason you want to download and compile ? - regarding the error shown configure: error: No Fortran compiler found you tried to do something ?

  • If you need the latest version of R, the best way is by APT, using repository backport (see the specific instructions for your version of Debian in the link posted by Icaro). If it is a Debian-based distro, check first if it provides a backport system and if R is on it.

  • 1

    By the traditional method I tried yes, I followed what is on the official page. But it has distros based on debian( POP OS) that comes with version 3.6, and in my current distro (AMAROK) is coming with 4.0 (applying the commands "traditional" apt) But on the official website already has a package on tar . gz with the latest version, it is only a different installation, that is, the compilation. And that where this package does not work the commands recommended by README and INSTALL.

  • 1

    But I will check if there is something missing in my distro, and also check the backport. E regarding the "Fortran" error, I am in the search. But unsuccessfully so far. Thank you so much! For the tips !!!

2 answers

2

Start by editing the reporitory file for R version 4.*, see the official documentation on Debian Packages of R Software:

sudo add-apt-repository 'deb http://cloud.r-project.org/bin/linux/debian buster-cran40/'

Or manually edit the file

/etc/apt/sources.list

and include the line

deb http://cloud.r-project.org/bin/linux/debian buster-cran40/

Or, in Ubuntu, in the file

/etc/apt/sources.list

include the lines

deb https://cran.r-project.org/bin/linux/ubuntu focal-cran40/
deb-src https://cran.r-project.org/bin/linux/ubuntu focal-cran40/

Now it should just be update and install

sudo apt update
sudo apt install r-base r-base-dev

0

Hello in the FAQ itself has some steps :

Debian Packages, maintained by Dirk Eddelbuettel, have long been part of the Debian Distribution, and can be accessed through APT, the Debian package Maintenance tool.

// Translating would be that the R dependency packages do not come as default in Debian and can be installed by these commands:

apt-get install r-base r-recommended

apt-get install r-base-dev
  • yes, but it’s not version 4.1.1 , in some Debian-based distributions, with this command going back to version 3.6 where it limits the use of many packages. In my case, the use of these commands with my current distro comes 4.0, but I don’t want this one, but 4.1.1 , but thank you very much

Browser other questions tagged

You are not signed in. Login or sign up in order to post.