Rmarkdown failing to install in Linux

I am trying to start using Rmarkdown using this guide.

The first step was to install rmarkdown as follows: install.packages('rmarkdown')

However, even this is giving me difficulties.

Here is the output:

Installing package into ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘markdown’, ‘stringi’, ‘knitr’, ‘yaml’, ‘htmltools’, ‘base64enc’, ‘jsonlite’, ‘mime’, ‘stringr’

trying URL 'https://cran.rstudio.com/src/contrib/markdown_1.1.tar.gz'
Content type 'application/x-gzip' length 81050 bytes (79 KB)
==================================================
downloaded 79 KB

trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.4.3.tar.gz'
Content type 'application/x-gzip' length 7290890 bytes (7.0 MB)
==================================================
downloaded 7.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.25.tar.gz'
Content type 'application/x-gzip' length 883483 bytes (862 KB)
==================================================
downloaded 862 KB

trying URL 'https://cran.rstudio.com/src/contrib/yaml_2.2.0.tar.gz'
Content type 'application/x-gzip' length 89447 bytes (87 KB)
==================================================
downloaded 87 KB

trying URL 'https://cran.rstudio.com/src/contrib/htmltools_0.3.6.tar.gz'
Content type 'application/x-gzip' length 45408 bytes (44 KB)
==================================================
downloaded 44 KB

trying URL 'https://cran.rstudio.com/src/contrib/base64enc_0.1-3.tar.gz'
Content type 'application/x-gzip' length 7833 bytes
==================================================
downloaded 7833 bytes

trying URL 'https://cran.rstudio.com/src/contrib/jsonlite_1.6.tar.gz'
Content type 'application/x-gzip' length 1052728 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/mime_0.7.tar.gz'
Content type 'application/x-gzip' length 13130 bytes (12 KB)
==================================================
downloaded 12 KB

trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
==================================================
downloaded 132 KB

trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.15.tar.gz'
Content type 'application/x-gzip' length 3174782 bytes (3.0 MB)
==================================================
downloaded 3.0 MB

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
checking for R_HOME... /usr/lib64/R
checking for R... /usr/lib64/R/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for cat... /usr/bin/cat
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
checking for local ICUDT_DIR... icu61/data
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 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 elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking whether we are using the GNU C++ compiler... no
checking whether   accepts -g... no
checking whether the C++ compiler supports the long long type... no
*** trying with disabled C++11 compiler
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
/usr/lib64/R/bin/config: line 179: make: command not found
/usr/lib64/R/bin/config: line 180: make: command not found
/usr/lib64/R/bin/config: line 181: make: command not found
/usr/lib64/R/bin/config: line 182: make: command not found
/usr/lib64/R/bin/config: line 183: make: command not found
/usr/lib64/R/bin/config: line 319: make: command not found
checking for local ICUDT_DIR... icu55/data
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... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for elf.h... (cached) yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether the C++ compiler supports the long long type... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler supports Standard Template Library... yes
checking whether std::map is available... yes
checking for pkg-config... /usr/bin/pkg-config
checking with pkg-config for the system ICU4C... 64.2
checking for ICU4C >= 52... yes
checking for additional required CPPFLAGS, LDFLAGS, and LIBS... done
checking whether we may build an ICU4C-based project... yes
checking programmatically for sufficient U_ICU_VERSION_MAJOR_NUM... yes
checking programmatically if U_CHARSET_IS_UTF8 is defined and set... yes
checking for available ICU data library (ucnv, uloc, utrans)... yes
checking for available ICU data library (ucol)... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/uconfig_local.h
config.status: creating src/install.libs.R

*** stringi configure summary:
    ICU_FOUND=1
    STRINGI_CXXSTD=
    STRINGI_CFLAGS=   
    STRINGI_CPPFLAGS=-I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H -DU_HAVE_ELF_H
    STRINGI_CXXFLAGS=   
    STRINGI_LDFLAGS=-L/usr/lib   
    STRINGI_LIBS=-licui18n -licuuc -licudata   

*** compiler settings used:
    CC=gcc
    CPP=gcc -E
    LD=
    CFLAGS=   
    CPPFLAGS=   -UDEBUG -DNDEBUG -DU_HAVE_ELF_H
    CXX=g++
    CXXFLAGS=   
    LDFLAGS=  
    LIBS=  

** libs
sh: make: command not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘stringi’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status
* installing *source* package ‘yaml’ ...
** package ‘yaml’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: make: command not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘yaml’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/yaml’
Warning in install.packages :
  installation of package ‘yaml’ had non-zero exit status
* installing *source* package ‘htmltools’ ...
** package ‘htmltools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: make: command not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘htmltools’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/htmltools’
Warning in install.packages :
  installation of package ‘htmltools’ had non-zero exit status
* installing *source* package ‘base64enc’ ...
** package ‘base64enc’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: make: command not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘base64enc’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/base64enc’
Warning in install.packages :
  installation of package ‘base64enc’ had non-zero exit status
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: make: command not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘jsonlite’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/jsonlite’
Warning in install.packages :
  installation of package ‘jsonlite’ had non-zero exit status
* installing *source* package ‘mime’ ...
** package ‘mime’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: make: command not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘mime’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/mime’
Warning in install.packages :
  installation of package ‘mime’ had non-zero exit status
ERROR: dependency ‘mime’ is not available for package ‘markdown’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/markdown’
Warning in install.packages :
  installation of package ‘markdown’ had non-zero exit status
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/stringr’
Warning in install.packages :
  installation of package ‘stringr’ had non-zero exit status
ERROR: dependencies ‘markdown’, ‘stringr’, ‘yaml’ are not available for package ‘knitr’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/knitr’
Warning in install.packages :
  installation of package ‘knitr’ had non-zero exit status
ERROR: dependencies ‘knitr’, ‘yaml’, ‘htmltools’, ‘base64enc’, ‘jsonlite’, ‘mime’, ‘stringr’ are not available for package ‘rmarkdown’
* removing ‘/home/mohammeds/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown’
Warning in install.packages :
  installation of package ‘rmarkdown’ had non-zero exit status

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

I am not sure if this will be helpful, but here is my session info:


R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Manjaro Linux

Matrix products: default
BLAS:   /usr/lib/libblas.so.3.8.0
LAPACK: /usr/lib/liblapack.so.3.8.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1   

Any ideas on what the issue might be?

There's something very wrong with your compiler chain. The package installers can't find make, which is impressive, given how basic it is as a utility.

What happens if you, from the console (not R, the Linux console), type:
$ which make

1 Like

Since you are in manjaro try reinstalling make with this command from a system terminal

sudo pacman -S make
1 Like

Thank you. That worked.

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