ejabberdctl start为p1_yaml导致错误

时间:2015-11-17 11:03:36

标签: linux erlang xmpp yaml ejabberd

我正在尝试在我的服务器上配置 eJabberd

我完成了安装,但是当我尝试使用

启动ejabberd时
ejabberdctl start

它在日志文件中显示以下错误

2015-11-17 03:28:29.928 [info] <0.7.0> Application asn1 started on node ejabberd@localhost
2015-11-17 03:28:29.928 [info] <0.7.0> Application public_key started on node ejabberd@localhost
2015-11-17 03:28:29.941 [info] <0.7.0> Application ssl started on node ejabberd@localhost
2015-11-17 03:28:29.945 [warning] <0.100.0> unable to load p1_yaml NIF: {error,{load_failed,"Failed to load NIF library /lib/p1_yaml/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"}}
2015-11-17 03:28:29.945 [error] <0.99.0> CRASH REPORT Process <0.99.0> with 0 neighbours exited with reason: {{load_failed,"Failed to load NIF library /lib/p1_yaml/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 134
2015-11-17 03:28:29.945 [info] <0.7.0> Application p1_yaml exited with reason: {{load_failed,"Failed to load NIF library /lib/p1_yaml/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"},{p1_yaml_app,start,[normal,[]]}}
2015-11-17 03:28:29.947 [critical] <0.38.0>@ejabberd:exit_or_halt:133 failed to start application 'p1_yaml': {error,
                                        {{load_failed,
                                          "Failed to load NIF library /lib/p1_yaml/priv/lib/p1_yaml: 'libyaml-0.so.2: cannot open shared object file: No such file or directory'"},
                                         {p1_yaml_app,start,[normal,[]]}}}

作为参考, p1_yaml 文件位于以下目录中:

root@ip-XX-XX-XX-XX [/lib/p1_yaml/priv/lib]# locate libyaml-0.so
/root/tmp/downloads/yaml-0.1.5/src/.libs/libyaml-0.so.2
/root/tmp/downloads/yaml-0.1.5/src/.libs/libyaml-0.so.2.0.3
/usr/local/lib/libyaml-0.so.2
/usr/local/lib/libyaml-0.so.2.0.3

我无法追查此问题。任何类型的参考都将非常有用。 提前谢谢。

1 个答案:

答案 0 :(得分:1)

检查/usr/local/lib/中是否列出了LD_LIBRARY_PATH,如果没有将其添加到其中,请重新启动ejabberd

$ export LD_LIBRARY_PATH=/usr/local/lib