gpt4 book ai didi

r - 无法在 Virtualbox 中的 CentOS 7 上编译 R Rspectra 包

转载 作者:太空宇宙 更新时间:2023-11-04 12:32:23 24 4
gpt4 key购买 nike

我正在尝试在 VirtualBox 中的 CentOS 7 安装上安装 R RSpectra 软件包,但安装挂起。以下是来自 shell 和 R 终端的一些系统信息:

[vagrant@localhost ~]$ cat /etc/*-release
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
[vagrant@localhost ~]$


> Sys.info()
sysname release
"Linux" "3.10.0-514.10.2.el7.x86_64"
version nodename
"#1 SMP Fri Mar 3 00:04:05 UTC 2017" "localhost.localdomain"
machine login
"x86_64" "vagrant"
user effective_user
"root" "root"

> as.matrix(R.Version())
[,1]
platform "x86_64-redhat-linux-gnu"
arch "x86_64"
os "linux-gnu"
system "x86_64, linux-gnu"
status ""
major "3"
minor "3.2"
year "2016"
month "10"
day "31"
svn rev "71607"
language "R"
version.string "R version 3.3.2 (2016-10-31)"
nickname "Sincere Pumpkin Patch"

这是显示安装挂起的 R 控制台输出:

> install.packages("RSpectra", quiet=FALSE, verbose=TRUE)
Installing package into '/usr/lib64/R/library'
(as 'lib' is unspecified)
system (cmd0): /usr/lib64/R/bin/R CMD INSTALL
trying URL 'https://cran.uni-muenster.de/src/contrib/RSpectra_0.12-0.tar.gz'
Content type 'unknown' length 426762 bytes (416 KB)
==================================================
downloaded 416 KB

foundpkgs: RSpectra, /tmp/RtmpYHq9lV/downloaded_packages/RSpectra_0.12-0.tar.gz
files: /tmp/RtmpYHq9lV/downloaded_packages/RSpectra_0.12-0.tar.gz
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
* installing *source* package 'RSpectra' ...
** package 'RSpectra' successfully unpacked and MD5 sums checked
** libs
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c eigs_gen.cpp -o eigs_gen.o

因为安装挂了,不知道从哪里开始找错误。我通过使用解决了以前在另一个平台上安装 R 包的问题:

sudo apt-get install -y libcurl4-openssl-dev 
sudo apt-get install -y libxml2-dev

我希望 RSpectra 有类似的解决方案。

最佳答案

我通过使用 Vagrantfile 为 VM 分配更多内存解决了这个问题:

config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "4096"
end

关于r - 无法在 Virtualbox 中的 CentOS 7 上编译 R Rspectra 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42970731/

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