Hello,
I'm trying to run ejabberd on Centos 6. I followed the steps in doc but an error keeps showing. For some reason, library libyaml-0.so.2 is failing to load. Here it is where libyaml-0.so.2 is located at:
[root@ip-10-72-132-52 ~]# find / -name libyaml-0.so.2 -exec ls -l '{}' \;
lrwxrwxrwx. 1 root root 18 Oct 18 12:22 /tmp/yaml-0.1.4/src/.libs/libyaml-0.so.2 -> libyaml-0.so.2.0.2
lrwxrwxrwx. 1 root root 29 Nov 6 10:25 /usr/lib/libyaml-0.so.2 -> /usr/local/lib/libyaml-0.so.2
lrwxrwxrwx. 1 root root 18 Nov 5 11:59 /usr/src/yaml-0.1.4/src/.libs/libyaml-0.so.2 -> libyaml-0.so.2.0.2
lrwxrwxrwx. 1 root root 18 Nov 5 11:59 /usr/local/lib/libyaml-0.so.2 -> libyaml-0.so.2.0.2
Now, the error when I run "ejabberdctl live":
[root@ip-10-72-132-52 ~]# ejabberdctl live
--------------------------------------------------------------------
IMPORTANT: ejabberd is going to start in LIVE (interactive) mode.
All log messages will be shown in the command shell.
You can interact with the ejabberd node if you know how to use it.
Please be extremely cautious with your actions,
and exit immediately if you are not completely sure.
To exit this LIVE mode and stop ejabberd, press:
q(). and press the Enter key
--------------------------------------------------------------------
To bypass permanently this warning, add to ejabberdctl.cfg the line:
EJABBERD_BYPASS_WARNINGS=true
Press any key to continue
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:0] [hipe] [kernel-poll:true]
Eshell V5.9.1 (abort with ^G)
(ejabberd@localhost)1> 10:39:37.785 [info] Application lager started on node ejabberd@localhost
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.67.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.68.0>},
{name,overload},
{mfargs,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.66.0>},
{name,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.69.0>},
{name,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
application: sasl
started_at: ejabberd@localhost
10:39:37.828 [info] Application sasl started on node ejabberd@localhost
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,crypto_sup}
started: [{pid,<0.76.0>},
{name,crypto_server},
{mfargs,{crypto_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
application: crypto
started_at: ejabberd@localhost
10:39:37.866 [info] Application crypto started on node ejabberd@localhost
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
application: public_key
started_at: ejabberd@localhost
10:39:37.873 [info] Application public_key started on node ejabberd@localhost
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.84.0>},
{name,ssl_manager},
{mfargs,{ssl_manager,start_link,[[]]}},
{restart_type,permanent},
{shutdown,4000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.85.0>},
{name,ssl_connection},
{mfargs,{ssl_connection_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,4000},
{child_type,supervisor}]
=PROGRESS REPORT==== 7-Nov-2013::10:39:37 ===
application: ssl
started_at: ejabberd@localhost
10:39:37.890 [info] Application ssl started on node ejabberd@localhost
10:39:37.937 [error] unable to load p1_yaml NIF: {error,{load_failed,"Failed to load NIF library /lib/ejabberd/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"}}
10:39:38.026 [critical] failed to start application 'p1_yaml': {error,
{{load_failed,
"Failed to load NIF library /lib/ejabberd/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"},
{p1_yaml_app,start,[normal,[]]}}}
=CRASH REPORT==== 7-Nov-2013::10:39:37 ===
crasher:
initial call: application_master:init/4
pid: <0.88.0>
registered_name: []
exception exit: {{load_failed,"Failed to load NIF library /lib/ejabberd/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"},
{p1_yaml_app,start,[normal,[]]}}
in function application_master:init/4 (application_master.erl, line 138)
ancestors: [<0.87.0>]
messages: [{'EXIT',<0.89.0>,normal}]
links: [<0.87.0>,<0.6.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 610
stack_size: 24
reductions: 128
neighbours:
10:39:38.034 [error] CRASH REPORT Process <0.88.0> with 0 neighbours exited with reason: {{load_failed,"Failed to load NIF library /lib/ejabberd/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"},{p1_yaml_app,start,[normal,[]]}} in application_master:init/4 line 138
10:39:38.038 [info] Application p1_yaml exited with reason: {{load_failed,"Failed to load NIF library /lib/ejabberd/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"},{p1_yaml_app,start,[normal,[]]}}
Crash dump was written to: //var/log/ejabberd/erl_crash_20131107-103934.dump
failed to start application 'p1_yaml': {error,
{{load_failed,
"Failed to load NIF library /lib/ejabberd/priv/lib/p1_y
Any idea on how to solve this?
Thank you very much.
Borja
`ldd p1_yaml.so` will give
`ldd p1_yaml.so` will give you more information on where the linker is trying to search for libyaml-0.so.2.
[root@ip-10-73-151-51 ~]#
[root@ip-10-73-151-51 ~]# find / -name p1_yaml.so -exec ls -l '{}' \;
-rwxrwxrwx. 1 root root 32832 Nov 6 10:28 /lib/ejabberd/priv/lib/p1_yaml.so
-rwxrwxrwx. 1 root root 32824 Oct 18 12:24 /tmp/ejabberd-13.10/deps/p1_yaml/priv/lib/p1_yaml.so
-rwxrwxrwx. 1 root root 32808 Oct 18 12:44 /tmp/p1_yaml/priv/lib/p1_yaml.so
-rwxrwxrwx. 1 root root 32832 Nov 6 10:26 /usr/src/ejabberd-13.10/deps/p1_yaml/priv/lib/p1_yaml.so
[root@ip-10-73-151-51 ~]# ldd /lib/ejabberd/priv/lib/p1_yaml.so
linux-vdso.so.1 => (0x00007fff337ff000)
libyaml-0.so.2 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007fdc06196000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdc06735000)
[root@ip-10-73-151-51 ~]# ldd /tmp/ejabberd-13.10/deps/p1_yaml/priv/lib/p1_yaml.so
linux-vdso.so.1 => (0x00007fff949ff000)
libyaml-0.so.2 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007fea9837d000)
/lib64/ld-linux-x86-64.so.2 (0x00007fea9891c000)
[root@ip-10-73-151-51 ~]# ldd /tmp/p1_yaml/priv/lib/p1_yaml.so
linux-vdso.so.1 => (0x00007fffaa10b000)
libyaml-0.so.2 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007fa8c5e54000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa8c63f3000)
[root@ip-10-73-151-51 ~]# ldd /usr/src/ejabberd-13.10/deps/p1_yaml/priv/lib/p1_yaml.so
linux-vdso.so.1 => (0x00007fffb8fff000)
libyaml-0.so.2 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f3a45a2f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3a45fce000)
Is there any option at the time of compiling that I can use to tell where these library?
Thank you.
Experiencing exactly the same
Experiencing exactly the same problem. Were you able to solve it?
this is because ejabberd
this is because ejabberd cannot find the file libyaml-0.so.2, just copy this file to some place that ejabberd can visit (ubuntu ex: /lib/x86_64/-linux-gnu/libyaml-0.so.2). it is better to solve this by set some environment variables, tell me if you find how to do this. thank you!
I solved it running the
I solved it running the installation process all over again (including dependencies). Not sure yet why this was happening.
@borjagvo