gpt4 book ai didi

R 软件包未安装在 Rstudio 服务器上

转载 作者:行者123 更新时间:2023-12-03 09:01:27 24 4
gpt4 key购买 nike

我在 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

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

最佳答案

错误消息表明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

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

关于R 软件包未安装在 Rstudio 服务器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49844820/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com