安装'topicmodels'包时出错,非零退出状态; Ubuntu的

Ubuntu 14.04上,值得信赖:

install.packages('topicmodels')

错误信息:

 compilation terminated. make: *** [ctm.o] Error 1 ERROR: compilation failed for package 'topicmodels' * removing '/home/.../R/x86_64-pc-linux-gnu-library/3.1/topicmodels' The downloaded source packages are in '/tmp/Rtmp1L79dj/downloaded_packages' Warning message: In install.packages("topicmodels") : installation of package 'topicmodels' had **non-zero exit status** 

Solutions Collecting From Web of "安装'topicmodels'包时出错,非零退出状态; Ubuntu的"

我发现在我的两个Ubuntu安装中,非零退出状态是由没有gsl包引起的。 然而,我花了相当长的时间才弄清楚哪个版本可以解决这个错误。

在终端中: sudo apt-get install libgsl0-dev

在这个版本的主题模型中,构建脚本包含错误的文件名:

 install.packages("topicmodels") Installing package into '/home/ga/R/x86_64-pc-linux-gnu-library/3.3' (as 'lib' is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/topicmodels_0.2-6.tar.gz' ... g++ -std=c++11 -shared -L/usr/lib/R/lib -L/usr/lib/x86_64-linux-gnu -lgsl -lglscblas -o topicmodels.so cokus.o common.o ctm.o dataset.o gsl-wrappers.o inference.o init.o lda-alpha.o lda-inference.o lda-model.o model.o rGibbslda.o rctm.o rlda.o utilities.o utils.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib/R/lib -lR /usr/bin/ld: cannot find -lglscblas