在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**
答案 0 :(得分:29)
我发现在我的两个Ubuntu安装中,非零退出状态是由于没有gsl
包而引起的。但是,在我找出哪个版本可以解决错误之前,我花了很长时间。
在终端:sudo apt-get install libgsl0-dev
答案 1 :(得分:0)
在此版本的topicmodel中,构建脚本包含错误的文件名:
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