R包未安装在Rstudio服务器上

时间:2018-04-15 17:28:17

标签: r rstudio-server

我在我的Ubuntu 17.1服务器上安装了RStudio Server。但是我的包都没有安装: 例如。当我尝试安装RMySQL包时,出现以下错误:

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

根据建议,我在我的控制台上尝试了以下内容:

sudo apt-get install libmysqlclient-dev

sudo apt-get install libmariadbclient-dev

但我仍然得到同样的错误。 请帮忙

1 个答案:

答案 0 :(得分:2)

错误消息表明未安装make。这表示您的系统上没有make实用程序。

为了让R安装软件包,必须在Ubuntu中安装base-r-dev软件包。 r-base-dev包含许多软件包,其中一个名为build-essential,涵盖gcc编译器和make

要安装r-base-dev,请在Linux终端窗口中发出以下命令,假设您已安装r-base

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

请注意,您的安装中可能存在其他错误,但在调试任何其他错误消息之前,需要更正此错误。