在 R Ubuntu 中安装主题模型时出错 [英] error Installing topicmodels in R Ubuntu
本文介绍了在 R Ubuntu 中安装主题模型时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 R
中安装 topicmodels
包时出现错误.
I am getting error while installing topicmodels
package in R
.
在运行 install.packages("topicmodels",dependencies=TRUE)
以下是我得到的最后几行.请帮忙.我的 R
版本是 3.1.3
.
on running install.packages("topicmodels",dependencies=TRUE)
following are the last few lines I am getting. Please help. My R
version is 3.1.3
.
g++ -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c utilities.cpp -o utilities.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c utils.c -o utils.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o topicmodels.so cokus.o common.o ctm.o dataset.o gsl-wrappers.o inference.o lda-alpha.o lda-inference.o lda-model.o model.o rGibbslda.o rctm.o rlda.o utilities.o utils.o -lgsl -lgslcblas -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/topicmodels/libs
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/topicmodels/libs/topicmodels.so':
libgsl.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/topicmodels’
Warning message:
In install.packages("http://cran.r-project.org/src/contrib/topicmodels_0.2-1.tar.gz", :
installation of package ‘/tmp/RtmpbX6uuH/downloaded_packages/topicmodels_0.2-1.tar.gz’ had non-zero exit status
我已经在很多地方搜索过这个错误,但没有找到解决方案.请帮忙
I have searched for this error at many places but haven't found solution. Please help
推荐答案
您没有安装 GSL:
sudo apt-get install gsl-bin libgsl0-dev
这篇关于在 R Ubuntu 中安装主题模型时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文