【问题标题】:CouchDB Install Errors Involving http.c on CentOS在 CentOS 上涉及 http.c 的 CouchDB 安装错误
【发布时间】:2014-11-04 20:13:32
【问题描述】:

我在使用 Linux 内核版本 2.6.18-371.3.1.el5 的 CentOS 版本 5.10(最终版)x86_64 GNU/Linux 上尝试为 CouchDB 1.2.1 进行 make 和 sudo make install 时遇到错误。我安装了以下依赖项/成功执行了以下安装依赖项:

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 的包含。我安装了几个不同版本的 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)是罪魁祸首。

【问题讨论】:

    标签: centos couchdb


    【解决方案1】:

    您安装了不受支持的 SpiderMonkey (17.0.10) 版本,而仅支持 1.7.0 - 1.8.5。

    要解决此问题,请重新安装 js-devel 并确保其版本为 1.8.5(推荐使用版本)。如果您没有针对此版本的任何 RPM,您可以在 js185 项目的帮助下制作自己的 RPM。 (或者直接抓住它here

    转念一想,你做错了两件事。首先,当你的操作系统有系统包管理器时,不要通过make install 安装任何东西。您可以在couchdb-rpm 项目的帮助下针对最新的 CouchDB 版本制作正确的 RPM - 这是非常简单的过程。其次是 CouchDB 版本本身 - 1.2.1 在一年前发布,此时发布了 1.3、1.4 和 1.5 版本(1.5.1 具有重要的安全修复),1.6 将在一周或两周内发布。如果您要安装某些东西,即使使用 make install,也请尝试选择最新版本,除非您有严重的理由使用过时且不受支持的版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-12
      • 1970-01-01
      • 2014-05-24
      • 2014-12-02
      • 1970-01-01
      • 2012-11-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多