私のラップトップは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.3 )ニックネームがカボチャのヘルメット
なぜこのパッケージをRにインストールできないのか知っていますか?この問題を解決するためにいくつかの提案をすることができますか?
答え1
少なくともgsl-devel
GNU 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
間違い。