I'm trying to install couchdb 1.6.0 from source on CentOS 6.5 (EPEL resository has a very old version unfortunately) following this guide. Everything went fine until ./configure
step on couchdb - error: Could not find the jsapi header
I added --with-js-include
and --with-js-lib
arguments, just to see a slightly different error this time:
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.
The configure command I am using is: 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
gives me this:
-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
The packages I was installing were:
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