在 Ubuntu 18.x & 上安装 tidyverseR 3.4.4/3.5.1 [英] Installing tidyverse on Ubuntu 18.x & R 3.4.4/3.5.1

查看:20
本文介绍了在 Ubuntu 18.x & 上安装 tidyverseR 3.4.4/3.5.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试安装 tidyverse(以及组成 tidyverse 的软件包)并得到以下输出:

I attempted to install tidyverse (and the packages that make up tidyverse) and got the following output:

> install.packages('tidyverse', dependencies=TRUE, type="source")
Installing package into ‘/home/aos11409/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘dbplyr’, ‘modelr’

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

trying URL 'https://cloud.r-project.org/src/contrib/modelr_0.1.2.tar.gz'
Content type 'application/x-gzip' length 118432 bytes (115 KB)
==================================================
downloaded 115 KB

trying URL 'https://cloud.r-project.org/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'application/x-gzip' length 61647 bytes (60 KB)
==================================================
downloaded 60 KB

* installing *source* package ‘dbplyr’ ...
** package ‘dbplyr’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Warning: S3 methods ‘[.fun_list’, ‘[.grouped_df’, ‘all.equal.tbl_df’, ‘anti_join.data.frame’, ‘anti_join.tbl_df’, ‘arrange.data.frame’, ‘arrange.default’, ‘arrange.grouped_df’, ‘arrange.tbl_df’, ‘arrange_.data.frame’, ‘arrange_.tbl_df’, ‘as.data.frame.grouped_df’, ‘as.data.frame.rowwise_df’, ‘as.data.frame.tbl_cube’, ‘as.data.frame.tbl_df’, ‘as.table.tbl_cube’, ‘as.tbl.data.frame’, ‘as.tbl.tbl’, ‘as.tbl_cube.array’, ‘as.tbl_cube.data.frame’, ‘as.tbl_cube.matrix’, ‘as.tbl_cube.table’, ‘as_data_frame.grouped_df’, ‘as_data_frame.tbl_cube’, ‘auto_copy.tbl_cube’, ‘auto_copy.tbl_df’, ‘cbind.grouped_df’, ‘collapse.data.frame’, ‘collect.data.frame’, ‘common_by.NULL’, ‘common_by.character’, ‘common_by.default’, ‘common_by.list’, ‘compute.data.frame’, ‘copy_to.DBIConnection’, ‘copy_to.src_local’, ‘default_missing.data.frame’, ‘default_missing.default’, �� [... truncated]
Error in library.dynam(lib, package, package.lib) : 
  shared object ‘dplyr.so’ not found
ERROR: lazy loading failed for package ‘dbplyr’
* removing ‘/home/aos11409/R/x86_64-pc-linux-gnu-library/3.4/dbplyr’
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status
* installing *source* package ‘modelr’ ...
** package ‘modelr’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
Warning: S3 methods ‘[.fun_list’, ‘[.grouped_df’, ‘all.equal.tbl_df’, ‘anti_join.data.frame’, ‘anti_join.tbl_df’, ‘arrange.data.frame’, ‘arrange.default’, ‘arrange.grouped_df’, ‘arrange.tbl_df’, ‘arrange_.data.frame’, ‘arrange_.tbl_df’, ‘as.data.frame.grouped_df’, ‘as.data.frame.rowwise_df’, ‘as.data.frame.tbl_cube’, ‘as.data.frame.tbl_df’, ‘as.table.tbl_cube’, ‘as.tbl.data.frame’, ‘as.tbl.tbl’, ‘as.tbl_cube.array’, ‘as.tbl_cube.data.frame’, ‘as.tbl_cube.matrix’, ‘as.tbl_cube.table’, ‘as_data_frame.grouped_df’, ‘as_data_frame.tbl_cube’, ‘auto_copy.tbl_cube’, ‘auto_copy.tbl_df’, ‘cbind.grouped_df’, ‘collapse.data.frame’, ‘collect.data.frame’, ‘common_by.NULL’, ‘common_by.character’, ‘common_by.default’, ‘common_by.list’, ‘compute.data.frame’, ‘copy_to.DBIConnection’, ‘copy_to.src_local’, ‘default_missing.data.frame’, ‘default_missing.default’, �� [... truncated]
Error in library.dynam(lib, package, package.lib) : 
  shared object ‘dplyr.so’ not found
ERROR: lazy loading failed for package ‘modelr’
* removing ‘/home/aos11409/R/x86_64-pc-linux-gnu-library/3.4/modelr’
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependencies ‘dbplyr’, ‘modelr’ are not available for package ‘tidyverse’
* removing ‘/home/aos11409/R/x86_64-pc-linux-gnu-library/3.4/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

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

之后,tidyverse 没有安装,也无法识别.在这些情况下,是否有建议的方法来安装 tidyverse?是的?不?有效的替代方案?

Afterwards, tidyverse is not installed, and is not recognized. Is there a suggested way to install tidyverse under these conditions? Yes? No? Alternatives that have worked?

推荐答案

编辑

有一个更简单的方法:使用已经编译好的二进制文件.请参阅此链接(镜像) 了解更多信息

There is an easier way: use already compiled binaries. See this link (mirror) for more information

从您的 Linux 终端运行

From your Linux terminal, run

$> echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic/" | sudo tee -a /etc/apt/sources.list

R 3.5.x

$> echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list

然后使用命令将此密钥添加到您的系统

Then add this key to your system with the command

$> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

在那之后

$> sudo apt-get update
$> sudo apt-get upgrade -y

$> sudo apt-get install -y r-base r-recommended r-base-dev

搜索tidyverse是否可用

$> apt search r-cran-tidyverse
p   r-cran-tidyverse                - GNU R package "Easily Install and Load the

安装

$> sudo apt-get install -y build-dep r-cran-tidyverse

完成!!!

我最近在基于 Ubuntu 18.04 Bionic 的 Linux Mint 19 上安装了 tidyverse 软件包.这就是我所做的:

I've recently installed the tidyverse package on my Linux Mint 19 which is based on Ubuntu 18.04 Bionic. This is what I did:

从您的 Linux 终端运行

From your Linux terminal, run

$> sudo apt-get update

$> sudo apt-get install r-base r-base-dev r-recommended

$> sudo apt-get install libcurl4-openssl-dev libgit2-dev libxml2-dev libssl-dev libudunits2-dev libpoppler-cpp-dev

如果遇到以下包有未满足的依赖错误,请尝试运行以下命令修复

If you encounter The following packages have unmet dependencies error, try running the following to fix it

$> sudo apt-get install -f

然后在 R/RStudio 终端

Then in R/RStudio terminal

R> install.packages("tidyverse", dependencies = TRUE)

这篇关于在 Ubuntu 18.x & 上安装 tidyverseR 3.4.4/3.5.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆