【发布时间】:2014-06-11 20:40:26
【问题描述】:
我正在尝试在 R 中安装名为 topicmodels 的软件包,但没有成功。这是我尝试过的...
行动:
使用install.packages("topicmodels") 安装包
结果:
package ‘topicmodels’ is available as a source package but not as a binary
Warning in install.packages :
package ‘topicmodels’ is not available (for R version 3.1.0)
所以我说好吧,让我们从源代码安装
行动:
install.packages("/Users/my_name/Downloads/topicmodels_0.2-1.tar.gz",repos=NULL,type="source")
结果:
* installing *source* package ‘topicmodels’ ...
** package ‘topicmodels’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c cokus.c -o cokus.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c common.c -o common.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c ctm.c -o ctm.o
ctm.c:29:10: fatal error: 'gsl/gsl_rng.h' file not found
include gsl/gsl_rng.h
1 error generated.
make: *** [ctm.o] Error 1
ERROR: compilation failed for package ‘topicmodels’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/topicmodels’
Warning in install.packages :
installation of package ‘/Users/me/Downloads/topicmodels_0.2-1.tar.gz’ had non-zero exit status
然后我研究了这个 gsl 的东西并找到了this link。在那一刻,我认为我所有的问题都消失了,当我最终遵循这些指示时。我收到以下错误(在终端中)...
Warning in untar2(tarfile, files, list, exdir, restore_times) :
using pax extended headers
ERROR: cannot extract package from ‘topicmodels.tar.gz’
【问题讨论】:
-
什么风格的Linux?你是用你的 OS 包安装 gsl-dev 还是 gsl-devel 包?
-
Mac OSX 10.9.3 Mavericks 操作系统包是什么意思?
-
@user2801122 OS = 操作系统。我忽略了你在 Mac 上的事实,部分原因是你没有对问题的任何内容进行格式化。
-
tar:打开存档出错:无法打开“gsl-1.6.tar.gz”