2

I've tried installing CouchDB 2.1.0 and 2.1.1 on Raspbian Stretch following the instructions in this blog: http://andyfelong.com/2017/09/couchdb-2-1-on-raspberry-pi-raspbian-stretch/

However when I run the step make release I get a segmentation fault when trying 2.1.1 and the following error when trying 2.1.0:

/home/couchdb/apache-couchdb-2.1.0/src/couch/src/couch_httpd_db.erl:none: internal error in v3_kernel;
crash reason: {case_clause,[]}

  in function  v3_kernel:arg_con/1 (v3_kernel.erl, line 1531)
  in call from v3_kernel:is_var_clause/1 (v3_kernel.erl, line 1512)
  in call from v3_kernel:partition/1 (v3_kernel.erl, line 1076)
  in call from v3_kernel:match/4 (v3_kernel.erl, line 1006)
  in call from v3_kernel:match_clause/4 (v3_kernel.erl, line 1408)
  in call from lists:mapfoldl/3 (lists.erl, line 1354)
  in call from lists:mapfoldl/3 (lists.erl, line 1355)
  in call from v3_kernel:'-match_con_1/4-anonymous-0-'/3 (v3_kernel.erl, line 1136)
Compiling /home/couchdb/apache-couchdb-2.1.0/src/couch/src/couch_httpd_db.erl failed:
ERROR: compile failed while processing /home/couchdb/apache-couchdb-2.1.0/src/couch: rebar_abort
Makefile:67: recipe for target 'couch' failed
make: *** [couch] Error 1

Previously I installed CouchDB 1.2 on Wheezy, from apt-get, which was easy and worked well.

Eric Clack
  • 163
  • 11

2 Answers2

1

Use the Erlang package that comes with Debian Stretch, not the one from the Erlang Solutions repository:

sudo apt-get --no-install-recommends -y install \
    build-essential pkg-config erlang \
    libicu-dev libmozjs185-dev libcurl4-openssl-dev

Then install Couch from source as per the instructions on the official site:

http://docs.couchdb.org/en/2.1.1/install/unix.html#debian-based-systems

Eric Clack
  • 163
  • 11
0

Looking at the error message, it appears that Erlang is crashing with an internal error ("internal error in v3_kernel"). My initial thoughts regarding the issue seem to have been incorrect, and the ARM build isn't being hung up for the reason I initially thought.

In fact, the error message is proving rather elusive. I'd guess that Erlang is either installed incorrectly, or broken somehow. As suggested in a question about a similar internal error, it may be helpful to purge Erlang from your system, then reinstall it. To do this, try:

apt-get remove erlang
apt-get purge erlang
rm -rf /usr/local/lib/erlang
rm -rf /usr/local/bin/erlang
apt-get install erlang

This should ensure that your installation is working correctly. I'd then try installing a fresh copy of CouchDB (perhaps try 2.1.1 too?).

Aurora0001
  • 6,357
  • 3
  • 25
  • 39