R(Ubuntu)-无法安装软件包"readr",和“欧洲稳定器" [英] R (Ubuntu) - Can't install packages "readr" and "eurostat"
问题描述
我在R中安装"eurostats"软件包时遇到问题.解决问题后,我推断出问题出在"reader"软件包中.尝试安装它,发生这种情况:
I have a problem with installing "eurostats" package in R. After breaking down the problem, I deduced that the problem lies with "readr" package. Trying to install it, this occurs:
* installing *source* package ‘readr’ ...
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/shiny/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/shiny/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Collector.cpp -o Collector.o
之后,终端将冻结,就好像它处于活动状态,但是什么也没有发生.在此之前,我会解决语言环境设置(如果有帮助,请提及它).我能够安装其他软件包.
after which the terminal just freezes as if it is active but nothing happens.Prior to this, I kind of tackled with locale settings (just mentioning it if it helps). I was able to install other packages.
我的R和Linux详细信息如下:
My R and Linux details are as follows:
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.2.1 R6_2.2.0 tools_3.3.2 withr_1.0.2
[5] curl_2.2 memoise_1.0.0 git2r_0.16.0 digest_0.6.10
[9] devtools_1.12.0
有人可以帮我吗?
推荐答案
该计算机上的RAM不足.因此,您有两种选择:
You have insufficient RAM on that machine. So you have two options:
-
继续执行您的操作并尝试从源代码进行编译,这将需要更多的内存并且可能会失败
continue what you are doing and trying to compile from source, which will need more memory and is likely to fail
安装一个预编译的二进制文件(!!),这样您就不必首先编译
install a prebuilt binary (!!) so that you do not have to compile in the first place
最简单的方法是这样的(在Ubuntu 16.04的Docker实例中执行此操作时,我仅显示命令,而不显示输出,而在帐户为root
的Docker中执行此操作;否则在前面添加sudo
)
The easiest way is something like this (and I am showing only the commands, not the output while I do this in a Docker instance of Ubuntu 16.04, and I am doing this in Docker where the account is root
; otherwise add sudo
in front)
apt-get update # refresh
apt-get install software-properties-common
add-apt-repository -y "ppa:marutter/rrutter"
add-apt-repository -y "ppa:marutter/c2d4u"
apt-get update # now with new repos
apt-get install r-cran-readr
和瞧,您拥有阅读器包.现在,继续处理未打包为二进制文件的eurostat,但由于其C ++代码,可能不需要readr占用的大量资源.
and voila you have the readr package. Now proceed for eurostat which is not packaged as a binary, but may not require heavier resources which readr does due to its C++ code.
这篇关于R(Ubuntu)-无法安装软件包"readr",和“欧洲稳定器"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!