尝试将R Word-Cloud软件包安装到用户库中,但是收到以下错误。看起来它成功下载了包,但在安装过程中炸弹。我怀疑这个问题是由于尝试安装在用户库和第二个g ++行中而导致的,但不确定如何纠正。我正在运行Mint 17.1 64位。
任何建议都将不胜感激。
install.packages("wordcloud", lib="/media/Data/RPackages")
trying URL 'http://mirrors.nics.utk.edu/cran/src/contrib/wordcloud_2.5.tar.gz'
Content type 'application/x-gzip' length 40861 bytes (39 KB)
==================================================
downloaded 39 KB
.Rprofile: Setting CMU repositoryn
* installing *source* package ‘wordcloud’ ...
** package ‘wordcloud’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/media/Data/RPackages/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c layout.cpp -o layout.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o wordcloud.so layout.o .Rprofile: Setting CMU repositoryn -L/usr/lib/R/lib -lR
g++: error: .Rprofile:: No such file or directory
g++: error: Setting: No such file or directory
g++: error: CMU: No such file or directory
g++: error: repositoryn: No such file or directory
make: *** [wordcloud.so] Error 1**strong text**
ERROR: compilation failed for package ‘wordcloud’
* removing ‘/media/Data/RPackages/wordcloud’
Warning in install.packages :
installation of package ‘wordcloud’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpdScavH/downloaded_packages’
答案 0 :(得分:2)
找出问题所在。在我的.Rprofile文件中,我有以下内容:
cat(".Rprofile: Setting CMU repositoryn")
r = getOption("repos") # hard code the Oakridge repo for CRAN
r["CRAN"] = "http://mirrors.nics.utk.edu/cran/"
options(repos = r)
rm(r)
我删除了第一行,将其更改为以下内容:
r = getOption("repos") # hard code the Oakridge repo for CRAN
r["CRAN"] = "http://mirrors.nics.utk.edu/cran/"
options(repos = r)
rm(r)
重新启动R并安装工作。我猜WordCount包不喜欢第一行。