我在CentOS版本5.10(最终版)x86_64 GNU / Linux上使用Linux内核版本2.6.18-371.3.1.el5尝试制作和sudo make CouchDB 1.2.1时遇到错误。我安装/成功执行以下依赖项以安装依赖项:
Erlang R14B04 (erts-5.8.5) [source] [64-bit]
SpiderMonkey js-devel-1.70-8.el5.x86_64
curl 7.20.1 (x86_64-unknown-linux-gnu)
sudo yum install autoconf
sudo yum install autoconf-archive
sudo yum install automake
sudo yum install curl-devel
sudo yum install erlang-asn1
sudo yum install erlang-erts
sudo yum install erlang-eunit
sudo yum install erlang-os_mon
sudo yum install erlang-xmerl
sudo yum install help2man
sudo yum install js-devel
sudo yum install libicu-devel
sudo yum install libtool
sudo yum install perl-Test-Harness
然后按照说明运行以下内容:
wget http://archive.apache.org/dist/couchdb/1.2.1/apache-couchdb-1.2.1.tar.gz
tar -zxvf apache-couchdb-1.2.1.tar.gz
cd apache-couchdb-1.2.1
./configure
You have configured Apache CouchDB, time to relax.
Run `make && sudo make install' to install.
make && sudo make install
并收到以下错误:
gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/snappy/google-snappy -D_XOPEN_SOURCE
-I/opt/local/include -I/usr/local/include -I/usr/include -g -Wall -Werror -D_BSD_SOURCE
-I/usr/local/include -DXP_UNIX -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-17.0.10
-I/usr/include/nspr4 -I/opt/local/include -I/usr/local/include -I/usr/include -O2 -g -O2
-MT couchjs-http.o -MD -MP -MF .deps/couchjs-http.Tpo -c -o couchjs-http.o `test -f
'couch_js/http.c' || echo './'`couch_js/http.c
couch_js/http.c:101: error: expected specifier-qualifier-list before ‘jsint’
couch_js/http.c: In function ‘http_ctor’:
couch_js/http.c:140: error: ‘HTTPData’ has no member named ‘last_status’
cc1: warnings being treated as errors
couch_js/http.c:142: warning: passing argument 1 of ‘JS_SetPrivate’ from incompatible pointer type
couch_js/http.c:142: error: too many arguments to function ‘JS_SetPrivate’
couch_js/http.c:142: error: wrong type argument to unary exclamation mark
couch_js/http.c: In function ‘http_dtor’:
couch_js/http.c:162: warning: passing argument 1 of ‘JS_GetPrivate’ from incompatible pointer type
couch_js/http.c:162: error: too many arguments to function ‘JS_GetPrivate’
couch_js/http.c: In function ‘http_open’:
couch_js/http.c:174: warning: passing argument 1 of ‘JS_GetPrivate’ from incompatible pointer type
couch_js/http.c:174: error: too many arguments to function ‘JS_GetPrivate’
couch_js/http.c: In function ‘http_set_hdr’:
couch_js/http.c:246: warning: passing argument 1 of ‘JS_GetPrivate’ from incompatible pointer type
couch_js/http.c:246: error: too many arguments to function ‘JS_GetPrivate’
couch_js/http.c: In function ‘http_send’:
couch_js/http.c:306: warning: passing argument 1 of ‘JS_GetPrivate’ from incompatible pointer type
couch_js/http.c:306: error: too many arguments to function ‘JS_GetPrivate’
couch_js/http.c: In function ‘http_status’:
couch_js/http.c:334: warning: passing argument 1 of ‘JS_GetPrivate’ from incompatible pointer type
couch_js/http.c:334: error: too many arguments to function ‘JS_GetPrivate’
couch_js/http.c:341: error: ‘HTTPData’ has no member named ‘last_status’
couch_js/http.c: In function ‘recv_header’:
couch_js/http.c:548: error: ‘jsuint’ undeclared (first use in this function)
couch_js/http.c:548: error: (Each undeclared identifier is reported only once
couch_js/http.c:548: error: for each function it appears in.)
couch_js/http.c:548: error: expected ‘;’ before ‘hdrlen’
couch_js/http.c:558: error: ‘HTTPData’ has no member named ‘last_status’
couch_js/http.c:579: error: ‘hdrlen’ undeclared (first use in this function)
make[4]: *** [couchjs-http.o] Error 1
make[4]: Leaving directory `/home/username/apache-couchdb-1.2.1/src/couchdb/priv'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/username/apache-couchdb-1.2.1/src/couchdb'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/username/apache-couchdb-1.2.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/username/apache-couchdb-1.2.1'
make: *** [all] Error 2
以前有人遇到过这样的事吗?我在http.c中搜索并发现了curl / curl.h的include。我安装了几个不同版本的curl,但最新版本出现了:
curl --version
curl 7.20.1 (x86_64-unknown-linux-gnu) libcurl/7.20.1 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: dict file ftp ftps http https imap imaps ldap pop3 pop3s rtsp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM SSL libz
我不知道curl是否与错误有关;也许我试图安装的CouchDB版本(来自http://archive.apache.org/dist/couchdb/1.2.1/apache-couchdb-1.2.1.tar.gz)是责备。
答案 0 :(得分:0)
您安装了不受支持的SpiderMonkey版本(17.0.10),而仅支持1.7.0 - 1.8.5。
要解决此问题,请重新安装js-devel并确保它具有1.8.5版本(建议使用版本1.8)。如果您没有针对此版本的任何RPM,您可以在js185项目的帮助下自行制作。 (或者只是抓住它here)
第二个想法,你做了两件坏事。首先,当操作系统有系统包管理器时,不要通过make install
安装任何东西。您可以在couchdb-rpm项目的帮助下针对最新的CouchDB版本制作适当的RPM - 这是非常简单的过程。其次是CouchDB版本本身 - 一年前发布了1.2.1,此时发布了1.3,1.4和1.5版本(1.5.1有重要的安全修复),1.6或者将在一两周内发布。如果您要安装某些东西,即使使用make install,也要尝试选择最新版本,除非您有充分的理由使用过时的和不受支持的版本。