我使用Louis Aslett提供的AMI设置了RStudio的AWS EC2实例。
然而,当我尝试安装包" topicsmodels"或" gsl"我收到以下错误:
> install.packages("gsl")
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/gsl_1.9-10.3.tar.gz'
Content type 'application/x-gzip' length 172529 bytes (168 KB)
==================================================
downloaded 168 KB
* installing *source* package ‘gsl’ ...
** package ‘gsl’ successfully unpacked and MD5 sums checked
checking for gsl-config... no
configure: error: gsl-config not found, is GSL installed?
ERROR: configuration failed for package ‘gsl’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4/gsl’
Warning in install.packages :
installation of package ‘gsl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpBItbU2/downloaded_packages’
和
> install.packages("topicmodels")
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/topicmodels_0.2-6.tar.gz'
Content type 'application/x-gzip' length 712766 bytes (696 KB)
==================================================
downloaded 696 KB
* installing *source* package ‘topicmodels’ ...
** package ‘topicmodels’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cokus.c -o cokus.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c common.c -o common.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ctm.c -o ctm.o
ctm.c:29:25: fatal error: gsl/gsl_rng.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'ctm.o' failed
make: *** [ctm.o] Error 1
ERROR: compilation failed for package ‘topicmodels’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4/topicmodels’
Warning in install.packages :
installation of package ‘topicmodels’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpBItbU2/downloaded_packages’
我对linux和RStudio服务器版的了解相当有限。我尝试过其他人遇到过类似问题的一些问题,但都没有工作(或者我无法按照说明操作)。
答案 0 :(得分:0)
经过一段时间的谷歌搜索后,这对我有用:
在Ubuntu中要安装topicmodels我需要确保两者:
GNU科学图书馆(GSL) - 二进制包
GNU科学图书馆(GSL) - 开发pacakage
已安装。