CentOS上涉及http.c的CouchDB安装错误
在CentOS 5.10版(最终版)x86_64 GNU/Linux上,Linux内核版本为2.6.18-371.3.1.el5,尝试为CouchDB 1.2.1进行make和sudo make安装时遇到错误。我已安装/成功执行以下依赖项以安装依赖项:CentOS上涉及http.c的CouchDB安装错误,centos,couchdb,Centos,Couchdb,在CentOS 5.10版(最终版)x86_64 GNU/Linux上,Linux内核版本为2.6.18-371.3.1.el5,尝试为CouchDB 1.2.1进行make和sudo make安装时遇到错误。我已安装/成功执行以下依赖项以安装依赖项: 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)
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
我不知道旋度是否和错误有关;可能是我试图安装的CouchDB版本(从)造成的。您安装了不受支持的SpiderMonkey版本(17.0.10),而只支持1.7.0-1.8.5 要解决此问题,请重新安装js-devel并确保其版本为1.8.5(建议使用)。如果您没有针对这个版本的RPM,您可以在project的帮助下创建自己的RPM。(或者干脆抓住它) 仔细想想,你做了两件错事。首先,当您的操作系统具有system package manager时,不要通过
进行安装。您可以在project的帮助下对最新的CouchDB版本进行适当的RPM—这是一个非常简单的过程。第二个是CouchDB版本本身——1.2.1已经在一年前发布了,此时1.3、1.4和1.5版本已经发布(1.5.1有重要的安全补丁),1.6将在一两周内发布。如果你要安装一些东西,即使使用makeinstall,也要尝试选择最新的版本,除非你有足够的理由使用过时的和不受支持的版本