Stack Exchange
Cannot install any ejabberd contrib module
I'm trying to instal ejabberd-contrib modules. Using this guide,
However when I run ejabberdctl modules_update_specs nothing is returned.
And when I try install any of the individual modules:
ejabberdctl module_install mod_pottymouth

 Failed RPC connection to the node ejabberd@localhost: {'EXIT',
                                                       {undef,
[{bitarray,new,
  [16777216,false],
  []},
 {etbloom,
  '-bloom/3-lc$^0/1-0-',
  2,
  [{file,
    "/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/deps/etbloom/src/etbloom.erl"},
   {line,77}]},
 {etbloom,bloom,3,
  [{file,
    "/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/deps/etbloom/src/etbloom.erl"},
   {line,77}]},
 {etbloom,sbf,4,
  [{file,
    "/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/deps/etbloom/src/etbloom.erl"},
   {line,98}]},
 {bloom_gen_server,
  init,1,
  [{file,
    "/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/bloom_gen_server.erl"},
   {line,28}]},
 {gen_server,init_it,
  2,
  [{file,
    "gen_server.erl"},
   {line,374}]},
 {gen_server,init_it,
  6,
  [{file,
    "gen_server.erl"},
   {line,342}]},
 {proc_lib,
  init_p_do_apply,3,
  [{file,
    "proc_lib.erl"},
   {line,249}]}]}}
Commands to start an ejabberd node:
  start      Start an ejabberd node in server mode
  debug      Attach an interactive Erlang shell to a running ejabberd node
  iexdebug   Attach an interactive Elixir shell to a running ejabberd node
  live       Start an ejabberd node in live (interactive) mode
  iexlive    Start an ejabberd node in live (interactive) mode, within an Elixir shell
  foreground Start an ejabberd node in server mode (attached)


ejabberdctl status
The node ejabberd@localhost is started with status: started

How can I fix this?

Hi @Milkyway, were you able to successfully install this module. I followed the exact steps in this link. But on ./rebar compile it gives me this error
/usr/bin/ld: cannot find -lerl_interface collect2: error: ld returned 1 exit status ERROR: cc c_src/bitarray_nif.o $LDFLAGS -shared  -L/usr/lib/erlang/lib/erl_interface-4.0.1/lib -lerl_interface -lei -o priv/bitarray.so failed with error: 1 and output: /usr/bin/ld: cannot find -lerl_interface


However when I run ejabberdctl modules_update_specs nothing is returned.

Then it probably worked correctly, otherwise it would have returned some error, and echo would return 1. Example that it worked correctly and created the path:
$ ejabberdctl modules_update_specs

$ echo $?
0

$ ls $HOME/.ejabberd-modules/
sources


And when I try install any of the individual modules:

Installing ANY module produces an error? For example, if you try installing mod_rest, does it work? Notice this reports a warning about documentation, which is not important:
$ ejabberdctl module_install mod_rest
/home/badlop/.ejabberd-modules/sources/ejabberd-contrib/mod_rest/src/mod_rest.erl:27: Warning: undefined callback function mod_doc/0 (behaviour 'gen_mod')

$ ls $HOME/.ejabberd-modules/
mod_rest  sources


{'EXIT', {undef, [{bitarray,new,

Yes, this is a known problem when installing mod_pottymouth. The workaround for installing that module is described in the README.txt file of that module. I've followed those instructions now, and the module compiled and installed correctly.
