我们在运行Rstudio (0.97版)的服务器上安装rstan时遇到了问题。我们使用的是Ubuntu 12.10 ( x86_64-pc-linux-gnu (64位))和R 2.15.1。
我安装了Rcpp_0.10.3和inline_0.3.11。但是,当我运行
options(repos = c(getOption("repos"), rstan = "http://wiki.stan.googlecode.com/git/R"))
install.packages('rstan', type = 'source')我得到以下错误:
g++: error: ***********HYPERATIVA**********: No such file or directory
g++: error: Analytics: No such file or directory
g++: error: Welcome: No such file or directory
g++: error: to: No such file or directory
g++: error: R!: No such file or directory
g++: error: ***********HYPERATIVA**********: No such file or directory
g++: error: Analytics: No such file or directory
g++: error: Goodbye!: No such file or directory
make: *** [rstan.so] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘/home/likewise-open/HYPERATIVANET/mgaldino/R/library/rstan’但是,这些文件夹确实存在,并且与其他包一起工作得很好。你们有人知道该怎么做吗?
发布于 2013-06-10 23:14:47
经过进一步检查,当站点范围或用户的Rprofile文件包含诸如“欢迎使用R!”之类的cat调用时,在RStan <= 1.3.0版本中似乎会导致此问题。一种可能的解决方法是将环境变量R_PROFILE和R_PROFILE_USER临时设置为指向空文件。
对于普通的R(不是RStudio),在bash shell中执行:
touch /tmp/Rprofile
export R_PROFILE=/tmp/Rprofile
export R_PROFILE_USER=/tmp/Rprofile
R -e "install.packages('rstan', type='source',repos='http://wiki.stan.googlecode.com/git/R')"
export R_PROFILE=
export R_PROFILE_USER=如果RStudio已经在运行,请在RStudio中执行等效命令:
system('touch /tmp/Rprofile')
Sys.setenv(R_PROFILE="/tmp/Rprofile")
Sys.setenv(R_PROFILE_USER="/tmp/Rprofile")
install.packages('rstan', type='source', repos='http://wiki.stan.googlecode.com/git/R')
Sys.unsetenv('R_PROFILE')
Sys.unsetenv('R_PROFILE_USER')https://stackoverflow.com/questions/16990833
复制相似问题