Centos, R에 "topicmodels" 패키지를 설치하는 방법은 무엇입니까?

Centos, R에 "topicmodels" 패키지를 설치하는 방법은 무엇입니까?

내 노트북에서 Linux CentOS 버전 6.6을 사용하고 있으며 R 환경에 "topicmodels" 패키지를 설치하려고 합니다.

그래서 install.packages("topicmodels") 명령을 사용했지만 안타깝게도 작동하지 않았습니다.

내가 받은 로그 메시지는 다음과 같습니다.

    * installing *source* package ‘topicmodels’ ...
** package ‘topicmodels’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c cokus.c -o cokus.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c common.c -o common.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c ctm.c -o ctm.o
ctm.c:29:25: error: gsl/gsl_rng.h: No such file or directory
ctm.c:30:28: error: gsl/gsl_vector.h: No such file or directory
ctm.c:31:28: error: gsl/gsl_matrix.h: No such file or directory
In file included from ctm.c:33:
gsl-wrappers.h:32: warning: type defaults to ‘int’ in declaration of ‘gsl_vector’
gsl-wrappers.h:32: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
gsl-wrappers.h:33: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:34: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:35: warning: type defaults to ‘int’ in declaration of ‘gsl_matrix’
gsl-wrappers.h:35: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
gsl-wrappers.h:36: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:37: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:38: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:39: warning: type defaults to ‘int’ in declaration of ‘gsl_vector’
gsl-wrappers.h:39: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
gsl-wrappers.h:40: warning: type defaults to ‘int’ in declaration of ‘gsl_matrix’
gsl-wrappers.h:40: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
gsl-wrappers.h:41: error: expected declaration specifiers or ‘...’ before ‘gsl_vector’
gsl-wrappers.h:42: error: expected declaration specifiers or ‘...’ before ‘gsl_matrix’
gsl-wrappers.h:43: error: expected declaration specifiers or ‘...’ before ‘gsl_vector’
gsl-wrappers.h:44: error: expected declaration specifiers or ‘...’ before ‘gsl_matrix’
gsl-wrappers.h:45: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:46: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:47: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:48: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:49: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:50: warning: type defaults to ‘int’ in declaration of ‘gsl_vector’
gsl-wrappers.h:50: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
gsl-wrappers.h:51: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:52: error: expected ‘)’ before ‘*’ token
gsl-wrappers.h:53: error: expected ‘)’ before ‘*’ token
In file included from ctm.c:34:
ctm.h:40: error: expected specifier-qualifier-list before ‘gsl_matrix’
ctm.h:55: error: expected specifier-qualifier-list before ‘gsl_matrix’
ctm.c: In function ‘new_llna_model’:
ctm.c:45: error: ‘llna_model’ has no member named ‘mu’
ctm.c:45: warning: implicit declaration of function ‘gsl_vector_calloc’
ctm.c:46: error: ‘llna_model’ has no member named ‘cov’
ctm.c:46: warning: implicit declaration of function ‘gsl_matrix_calloc’
ctm.c:47: error: ‘llna_model’ has no member named ‘inv_cov’
ctm.c:48: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c: In function ‘new_llna_ss’:
ctm.c:62: error: ‘llna_ss’ has no member named ‘mu_ss’
ctm.c:63: error: ‘llna_ss’ has no member named ‘cov_ss’
ctm.c:64: error: ‘llna_ss’ has no member named ‘beta_ss’
ctm.c:64: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:65: error: ‘llna_ss’ has no member named ‘ndata’
ctm.c: In function ‘del_llna_ss’:
ctm.c:73: warning: implicit declaration of function ‘gsl_vector_free’
ctm.c:73: error: ‘llna_ss’ has no member named ‘mu_ss’
ctm.c:74: warning: implicit declaration of function ‘gsl_matrix_free’
ctm.c:74: error: ‘llna_ss’ has no member named ‘cov_ss’
ctm.c:75: error: ‘llna_ss’ has no member named ‘beta_ss’
ctm.c: In function ‘reset_llna_ss’:
ctm.c:81: warning: implicit declaration of function ‘gsl_matrix_set_all’
ctm.c:81: error: ‘llna_ss’ has no member named ‘beta_ss’
ctm.c:82: error: ‘llna_ss’ has no member named ‘cov_ss’
ctm.c:83: warning: implicit declaration of function ‘gsl_vector_set_all’
ctm.c:83: error: ‘llna_ss’ has no member named ‘mu_ss’
ctm.c:84: error: ‘llna_ss’ has no member named ‘ndata’
ctm.c: In function ‘write_ss’:
ctm.c:90: error: ‘llna_ss’ has no member named ‘cov_ss’
ctm.c:90: error: too many arguments to function ‘printf_matrix’
ctm.c:91: error: ‘llna_ss’ has no member named ‘beta_ss’
ctm.c:91: error: too many arguments to function ‘printf_matrix’
ctm.c:92: error: ‘llna_ss’ has no member named ‘mu_ss’
ctm.c:92: error: too many arguments to function ‘printf_vector’
ctm.c: In function ‘corpus_init’:
ctm.c:103: error: ‘gsl_rng’ undeclared (first use in this function)
ctm.c:103: error: (Each undeclared identifier is reported only once
ctm.c:103: error: for each function it appears in.)
ctm.c:103: error: ‘r’ undeclared (first use in this function)
ctm.c:103: warning: implicit declaration of function ‘gsl_rng_alloc’
ctm.c:103: error: ‘gsl_rng_taus’ undeclared (first use in this function)
ctm.c:108: warning: implicit declaration of function ‘gsl_rng_set’
ctm.c:113: warning: implicit declaration of function ‘vset’
ctm.c:113: error: ‘llna_model’ has no member named ‘mu’
ctm.c:114: warning: implicit declaration of function ‘mset’
ctm.c:114: error: ‘llna_model’ has no member named ‘cov’
ctm.c:116: warning: implicit declaration of function ‘matrix_inverse’
ctm.c:116: error: ‘llna_model’ has no member named ‘cov’
ctm.c:116: error: ‘llna_model’ has no member named ‘inv_cov’
ctm.c:117: error: ‘llna_model’ has no member named ‘log_det_inv_cov’
ctm.c:117: warning: implicit declaration of function ‘log_det’
ctm.c:117: error: ‘llna_model’ has no member named ‘inv_cov’
ctm.c:126: warning: implicit declaration of function ‘gsl_rng_uniform’
ctm.c:131: warning: implicit declaration of function ‘minc’
ctm.c:131: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:135: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:137: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:139: warning: implicit declaration of function ‘mget’
ctm.c:139: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:143: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:145: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:146: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:149: warning: implicit declaration of function ‘gsl_rng_free’
ctm.c: In function ‘random_init’:
ctm.c:164: error: ‘gsl_rng’ undeclared (first use in this function)
ctm.c:164: error: ‘r’ undeclared (first use in this function)
ctm.c:164: error: ‘gsl_rng_taus’ undeclared (first use in this function)
ctm.c:170: error: ‘llna_model’ has no member named ‘mu’
ctm.c:171: error: ‘llna_model’ has no member named ‘cov’
ctm.c:180: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:183: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:183: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:185: error: ‘llna_model’ has no member named ‘cov’
ctm.c:185: error: ‘llna_model’ has no member named ‘inv_cov’
ctm.c:186: error: ‘llna_model’ has no member named ‘log_det_inv_cov’
ctm.c:186: error: ‘llna_model’ has no member named ‘inv_cov’
ctm.c: In function ‘write_llna_model’:
ctm.c:207: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:212: error: ‘llna_model’ has no member named ‘mu’
ctm.c:212: error: too many arguments to function ‘printf_vector’
ctm.c:214: error: ‘llna_model’ has no member named ‘cov’
ctm.c:214: error: too many arguments to function ‘printf_matrix’
ctm.c:216: error: ‘llna_model’ has no member named ‘inv_cov’
ctm.c:216: error: too many arguments to function ‘printf_matrix’
ctm.c:219: error: ‘llna_model’ has no member named ‘log_det_inv_cov’
ctm.c:224: error: ‘llna_model’ has no member named ‘log_beta’
ctm.c:224: error: too many arguments to function ‘printf_matrix’
make: *** [ctm.o] Error 1
ERROR: compilation failed for package ‘topicmodels’
* removing ‘/usr/lib64/R/library/topicmodels’

The downloaded source packages are in
    ‘/tmp/RtmpnduiXI/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:

install.packages("topicmodels")에서: "topicmodels" 패키지 설치의 종료 상태가 0이 아닙니다.

내 R 버전의 세부 정보는 다음과 같습니다.

플랫폼 x86_64-redhat-linux-gnu arch x86_64
os linux-gnu 시스템 x86_64, linux-gnu 상태 메이저 3 마이너 1.2
연도 2014 월 10
일 31 svn rev 66913
언어 R 버전.string R 버전 3.1.2 (2014-10- 31 ) 별명이 호박 헬멧

왜 이 패키지를 R에 설치할 수 없는지 아시나요? 이 문제를 해결하기 위한 몇 가지 제안을 해주실 수 있나요?

답변1

최소한 gsl-develGNU Scientific Library가 설치되어 있어야 합니다. 이건 고쳐야 해

ctm.c:29:25: error: gsl/gsl_rng.h: No such file or directory
ctm.c:30:28: error: gsl/gsl_vector.h: No such file or directory
ctm.c:31:28: error: gsl/gsl_matrix.h: No such file or directory

실수.

관련 정보