0

我正在尝试在 CentOS 6.8 上安装 CouchDB 2.0 并遇到此错误,我不确定出了什么问题。

有任何想法吗 ??

这是日志:

Compiled src/couch_db.erl
Compiled src/couch_native_process.erl
Compiled src/couch_util.erl
Compiling /root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:18:19: warning: jsapi.h: No such file or directory
In file included from /root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:20:
priv/couch_js/utf8.h:16: error: expected ‘)’ before ‘*’ token
priv/couch_js/utf8.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from /root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:21:
priv/couch_js/util.h:25: error: expected specifier-qualifier-list before ‘JSString’
priv/couch_js/util.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
priv/couch_js/util.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
priv/couch_js/util.h:32: error: expected ‘)’ before ‘*’ token
priv/couch_js/util.h:33: error: expected ‘)’ before ‘*’ token
priv/couch_js/util.h:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘couch_load_funcs’
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘http_ctor’
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘http_dtor’
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘http_open’
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘http_set_hdr’
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘http_send’
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:72: error: expected ‘)’ before ‘*’ token
/root/apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c:78: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘http_uri’
ERROR: compile failed while processing /root/apache-couchdb-2.0.0/src/couch: rebar_abort
make: *** [couch] Error 1

谢谢

4

1 回答 1

0

这是因为 jsapi.h 默认开启/usr/local/include/js/

尝试在 /usr 上编译带有前缀的 SpiderMonkey,如下所示:

./configure --prefix=/usr && make && make install

并再次编译couchdb。

于 2016-12-22T00:01:08.613 回答