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.

2 Answers 2


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:



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?).

  • Thanks, but after this change it still doesn't work. Firstly the ./bootstrap command fails with "ebin/rebar.bea#: error writing file: no such file or directory", and make clean; make release fails with "Illegal instruction".
    – Eric Clack
    Commented Jan 10, 2018 at 15:40
  • @EricClack Hmm, looking at the error message, it looks like Erlang might be the issue here. Could you check your Erlang version (the command is erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell in your terminal)?
    – Aurora0001
    Commented Jan 10, 2018 at 16:42
  • "19", and here's the output from dpkg-query --list "ii erlang 1:19.2.1+dfsg-2+d all Concurrent, real-time, distributed functional language"
    – Eric Clack
    Commented Jan 10, 2018 at 20:21
  • @EricClack Thanks; I've revised my answer with what I could gather from your error message, and as far as I can tell, the issue is with Erlang and not CouchDB. Take a read and let me know if any of the steps help.
    – Aurora0001
    Commented Jan 10, 2018 at 20:37
  • Thanks for the help. It still fails, here's the error: "Compiled src/global_changes_sup.erl Segmentation fault Makefile:67: recipe for target 'couch' failed make: *** [couch] Error 139"
    – Eric Clack
    Commented Jan 10, 2018 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.