r - 无法在 Ubuntu 20.04 上的 Rstudio 中加载已安装的软件包 : sh: 1: make: not found

标签 r linux ubuntu

例如,我可以使用 install.packages()安装dplyr ,但是当我尝试使用 library() 将其加载到 session 中时,会发生以下情况:

install.packages('dplyr')
    Installing package into ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6’
    (as ‘lib’ is unspecified)
    also installing the dependencies ‘fansi’, ‘purrr’, ‘cli’, ‘utf8’, ‘ellipsis’, ‘glue’, ‘lifecycle’, ‘magrittr’, ‘rlang’, ‘tibble’, ‘tidyselect’, ‘vctrs’, ‘pillar’

trying URL 'https://cloud.r-project.org/src/contrib/fansi_0.5.0.tar.gz'
Content type 'application/x-gzip' length 301724 bytes (294 KB)
==================================================
downloaded 294 KB

trying URL 'https://cloud.r-project.org/src/contrib/purrr_0.3.4.tar.gz'
Content type 'application/x-gzip' length 375062 bytes (366 KB)
==================================================
downloaded 366 KB

trying URL 'https://cloud.r-project.org/src/contrib/cli_3.0.1.tar.gz'
Content type 'application/x-gzip' length 225589 bytes (220 KB)
==================================================
downloaded 220 KB

trying URL 'https://cloud.r-project.org/src/contrib/utf8_1.2.2.tar.gz'
Content type 'application/x-gzip' length 240327 bytes (234 KB)
==================================================
downloaded 234 KB

trying URL 'https://cloud.r-project.org/src/contrib/ellipsis_0.3.2.tar.gz'
Content type 'application/x-gzip' length 8066 bytes
==================================================
downloaded 8066 bytes

trying URL 'https://cloud.r-project.org/src/contrib/glue_1.4.2.tar.gz'
Content type 'application/x-gzip' length 99049 bytes (96 KB)
==================================================
downloaded 96 KB

trying URL 'https://cloud.r-project.org/src/contrib/lifecycle_1.0.0.tar.gz'
Content type 'application/x-gzip' length 83389 bytes (81 KB)
==================================================
downloaded 81 KB

trying URL 'https://cloud.r-project.org/src/contrib/magrittr_2.0.1.tar.gz'
Content type 'application/x-gzip' length 265580 bytes (259 KB)
==================================================
downloaded 259 KB

trying URL 'https://cloud.r-project.org/src/contrib/rlang_0.4.11.tar.gz'
Content type 'application/x-gzip' length 861727 bytes (841 KB)
==================================================
downloaded 841 KB

trying URL 'https://cloud.r-project.org/src/contrib/tibble_3.1.4.tar.gz'
Content type 'application/x-gzip' length 737787 bytes (720 KB)
==================================================
downloaded 720 KB

trying URL 'https://cloud.r-project.org/src/contrib/tidyselect_1.1.1.tar.gz'
Content type 'application/x-gzip' length 92088 bytes (89 KB)
==================================================
downloaded 89 KB

trying URL 'https://cloud.r-project.org/src/contrib/vctrs_0.3.8.tar.gz'
Content type 'application/x-gzip' length 782608 bytes (764 KB)
==================================================
downloaded 764 KB

trying URL 'https://cloud.r-project.org/src/contrib/pillar_1.6.2.tar.gz'
Content type 'application/x-gzip' length 1130321 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cloud.r-project.org/src/contrib/dplyr_1.0.7.tar.gz'
Content type 'application/x-gzip' length 852103 bytes (832 KB)
==================================================
downloaded 832 KB

* installing *source* package ‘fansi’ ...
** package ‘fansi’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: 1: make: not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘fansi’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/fansi’
Warning in install.packages :
  installation of package ‘fansi’ had non-zero exit status
* installing *source* package ‘utf8’ ...
** package ‘utf8’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: 1: make: not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘utf8’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/utf8’
Warning in install.packages :
  installation of package ‘utf8’ had non-zero exit status
* installing *source* package ‘glue’ ...
** package ‘glue’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: 1: make: not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘glue’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/glue’
Warning in install.packages :
  installation of package ‘glue’ had non-zero exit status
* installing *source* package ‘magrittr’ ...
** package ‘magrittr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: 1: make: not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘magrittr’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/magrittr’
Warning in install.packages :
  installation of package ‘magrittr’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
sh: 1: make: not found
Warning in system(cmd) : error in running command
ERROR: compilation failed for package ‘rlang’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/rlang’
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status
ERROR: dependencies ‘magrittr’, ‘rlang’ are not available for package ‘purrr’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/purrr’
Warning in install.packages :
  installation of package ‘purrr’ had non-zero exit status
ERROR: dependency ‘glue’ is not available for package ‘cli’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/cli’
Warning in install.packages :
  installation of package ‘cli’ had non-zero exit status
ERROR: dependency ‘rlang’ is not available for package ‘ellipsis’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/ellipsis’
Warning in install.packages :
  installation of package ‘ellipsis’ had non-zero exit status
ERROR: dependencies ‘glue’, ‘rlang’ are not available for package ‘lifecycle’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/lifecycle’
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘glue’, ‘rlang’ are not available for package ‘vctrs’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘glue’, ‘purrr’, ‘rlang’, ‘vctrs’ are not available for package ‘tidyselect’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘ellipsis’, ‘fansi’, ‘lifecycle’, ‘rlang’, ‘utf8’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/pillar’
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘fansi’, ‘lifecycle’, ‘magrittr’, ‘pillar’, ‘rlang’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/tibble’
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘glue’, ‘lifecycle’, ‘magrittr’, ‘rlang’, ‘tibble’, ‘tidyselect’, ‘vctrs’, ‘pillar’ are not available for package ‘dplyr’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.6/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status
R 版本是 3.6.3,我使用 Linux x86_64-pc-linux 文件的发行版安装它,我的 Ubuntu 版本是 20.04,Rstudio 是 1.4.1717。
任何帮助将不胜感激

最佳答案

你需要有make安装。
尝试运行:

sudo apt-get install build-essential

关于r - 无法在 Ubuntu 20.04 上的 Rstudio 中加载已安装的软件包 : sh: 1: make: not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69212009/

相关文章:

r - 使用 st_read 在迭代 R 中导入大型 geojson

r - 如何将数据帧 A 中的每一列重复除以数据帧 B 中同一列的中位数?

r - mutate_at 有两组变量

linux - 鱿鱼 tcp_outgoing_address 失败,返回 "(22) Invalid argument"

c++ - 如何使用 C/C++ 获取数字锁定状态?

r - 比 for 循环更快地计算行之间的差异?

android - Fedora 64 位中的 Android 模拟器使用哪个 libGL?

linux - Linux 系统监视器如何获取进程统计信息

linux - 用于 sudo 访问的 ssh 环境变量

sql-server - SQL Server 2016标准版linux安装