Search code examples
rrstudio-server

R packages not installing on Rstudio server


I installed RStudio Server on my Ubuntu 17.1 server. But none of my packages are not installing: eg. When I am trying to install RMySQL package, I get the following error:

trying URL 'https://cran.rstudio.com/src/contrib/RMySQL_0.10.14.tar.gz'
Content type 'application/x-gzip' length 52703 bytes (51 KB)
==================================================
downloaded 51 KB

* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
Found mysql_config cflags and libs!
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
/usr/lib/R/bin/config: 1: eval: make: not found
Using PKG_CFLAGS=-I/usr/include/mariadb -I/usr/include/mariadb/mysql -g -O2 -fdebug-prefix-map=/build/mariadb-connector-c-ts5uYh/mariadb-connector-c-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wunused -Wno-uninitialized
Using PKG_LIBS=-L/usr/lib/x86_64-linux-gnu -lmariadb
/usr/lib/R/bin/config: 1: eval: make: not found
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because no mysql client library was found. Try installing:
 * deb: libmariadbclient-dev | libmariadb-client-lgpl-dev (Debian, Ubuntu)
 * rpm: mariadb-connector-c-devel | mariadb-devel | mysql-devel (Fedora, CentOS, RHEL)
 * csw: mysql56_dev (Solaris)
 * brew: mariadb-connector-c (OSX)
If you already have a mysql client library installed, verify that either
mariadb_config or mysql_config is on your PATH. If these are unavailable
you can also set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/home/qambrineh/R/x86_64-pc-linux-gnu-library/3.4/RMySQL’
Warning in install.packages :
  installation of package ‘RMySQL’ had non-zero exit status

As per the suggestions, I tried the following on my console:

sudo apt-get install libmysqlclient-dev

and

sudo apt-get install libmariadbclient-dev

but I still get the same error. please help


Solution

  • The error message indicates that make is not installed. This indicates that the make utility is not available on your system.

    In order for R to install packages, one must install the base-r-dev package in Ubuntu. r-base-dev includes a number of packages, including one called build-essential that covers the gcc compiler and make.

    To install r-base-dev, issue the following command in a linux terminal window, assuming that you have already installed r-base.

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

    Note that there may be other errors in your installation, but this one needs to be corrected before debugging any other other error messages.