我试图在CentOS 6.5上安装CouchDB1.6.0(遗憾的是,EPEL resository有一个非常老的版本),在本指南之后安装。一切都进行得很顺利,直到./configure步进couchdb - error: Could not find the jsapi header。
我添加了--with-js-include和--with-js-lib参数,这一次只是为了看到一个稍微不同的错误:
checking for erl... /opt/couchdb/erlang/bin/erl
checking for escript... /usr/bin/escript
checking for JS... no
checking for JS... no
checking jsapi.h usability... no
checking jsapi.h presence... yes
configure: WARNING: jsapi.h: present but cannot be compiled
configure: WARNING: jsapi.h: check for missing prerequisite headers?
configure: WARNING: jsapi.h: see the Autoconf documentation
configure: WARNING: jsapi.h: section "Present But Cannot Be Compiled"
configure: WARNING: jsapi.h: proceeding with the preprocessor's result
configure: WARNING: jsapi.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------------------------------ ##
configure: WARNING: ## Report this to https://issues.apache.org/jira/browse /COUCHDB ##
configure: WARNING: ## ------------------------------------------------------------ ##
checking for jsapi.h... yes
checking for JS_NewContext in -lmozjs185... no
checking for JS_NewContext in -lmozjs185-1.0... no
checking for JS_NewContext in -lmozjs... no
checking for JS_NewContext in -ljs... no
checking for JS_NewContext in -ljs3250... no
checking for JS_NewContext in -ljs32... no
configure: error: Could not find the js library.我使用的配置命令是:apache-couchdb-1.6.0]# ./configure --prefix=/opt/couchdb/couchdb --with-erlang=/opt/couchdb/erlang/lib/erlang/usr/include/ --enable-js-trunk --with-js-include=/usr/local/include/mozjs-24/ --with-js-lib=/usr/local/lib/libmozjs-24.so
ls -ltr /usr/local/lib给了我以下内容:
-r-xr-xr-x 1 root root 10362062 Aug 3 04:11 libpython2.7.a
drwxr-xr-x 27 root root 20480 Aug 3 04:11 python2.7
-rwxr-xr-x 1 root root 482243720 Aug 3 04:31 libmozjs-24.a
-rwxr-xr-x 1 root root 138436471 Aug 3 04:31 libmozjs-24.so
drwxr-xr-x 2 root root 4096 Aug 3 04:36 pkgconfig我正在安装的软件包是:
http://www.erlang.org/download/otp_src_17.1.tar.gz
http://curl.haxx.se/download/curl-7.37.1.tar.gz
https://ftp.mozilla.org/pub/mozilla.org/js/mozjs-24.2.0.tar.bz2
http://www.interior-dsgn.com/apache/couchdb/source/1.6.0/apache-couchdb-1.6.0.tar.gz发布于 2016-09-07 17:06:43
CouchDB需要安装特定版本的依赖项。来自INSTALL.Unix文件:
Dependencies
------------
You should have the following installed:
* Erlang OTP (>=R14B01, =<R17) (http://erlang.org/)
* ICU (http://icu-project.org/)
* OpenSSL (http://www.openssl.org/)
* Mozilla SpiderMonkey (1.8.5) (http://www.mozilla.org/js/spidermonkey/)
* GNU Make (http://www.gnu.org/software/make/)
* GNU Compiler Collection (http://gcc.gnu.org/)
* libcurl (http://curl.haxx.se/libcurl/)
* help2man (http://www.gnu.org/s/help2man/)
* Python (>=2.7) for docs (http://python.org/)
* Python Sphinx (>=1.1.3) (http://pypi.python.org/pypi/Sphinx)在我的例子中,我安装了SpiderMonkey 1.8.5和Erlang 17.5,以便安装在CentOS 6.4上。在安装了这些特定版本的SpiderMonkey和Erlang之后,我能够自动配置、构建、安装CouchDB:
./configure --enable-init ; make ; sudo make install您将需要“--启用- init”标志,以便包含init脚本,因此couchdb服务在启动时启动,您可以像正常服务一样控制它。
若要启用该服务,请运行:
pushd /etc/init.d ; sudo ln-s /usr/local/etc/rc.d/couchdb couchdb ; popd ; sudo chkconfig --add couchdb ; sudo chkconfig couchdb on您还需要添加couchdb用户,确保帐户被锁定,并设置相应目录的权限:
sudo adduser --no-create-home couchdb ; sudo usermod -L couchdb ; sudo chown -R couchdb:couchdb /usr/local/var/{lib,log,run}/couchdb /usr/local/etc/couchdb现在您可以启动该服务了:
sudo service couchdb start发布于 2014-08-28 20:17:17
使用http://wiki.apache.org/couchdb/Installing_SpiderMonkey从源代码中安装蜘蛛猴
重要的部分是从源头,而不是依赖于apt-get分布.
然后使用couchdb构建:
./configure --prefix=/usr/local --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs --enable-init发布于 2016-01-20 09:02:06
查看http://wiki.apache.org/couchdb/Installing_SpiderMonkey
“在1.1上安装”,并按照以下步骤执行
特别是,下载curl -L -O http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz版本正在工作。
https://serverfault.com/questions/618359
复制相似问题