无法通过Ejabberd连接Mysql - 应用程序'p1_mysql'启动失败。

4

最近我开始使用ejabberd,但在连接mysql时遇到了问题。

我使用Ubuntu命令行安装了ejabberd - sudo apt-get install ejabberd,并参考了以下教程来设置ejabberd - 在Ubuntu上安装ejabberd

现在,为了连接Mysql,我在ejabberd.yml中进行了以下更改 -

auth_method: odbc
odbc_type: mysql
odbc_server: "localhost"
odbc_database: "ejabberd"
odbc_username: "ejabberd"
odbc_password: "password"
##
## If you want to specify the port:
odbc_port: 3306

但是在重新启动服务时,我遇到了这个错误

[critical] <0.38.0>@ejabberd:exit_or_halt:133 failed to start application 'p1_mysql': {error,
                                         {"no such file or directory",
                                          "p1_mysql.app"}}

我看到有一些链接提到使用./configure --enable-odbc --enable-mysql来解决这个问题(适用于通过编译源代码安装ejabberd的情况),但由于我没有编译源代码安装ejabberd(就像我上面提到的那样),所以我无法这样做。我该如何解决这个问题?提前致谢。
2个回答

8

要在Ubuntu中使用ejabberd与Mysql,您需要安装erlang-p1-mysql软件包:

sudo apt install erlang-p1-mysql

我遇到了同样的问题,这个方法解决了它。


这正是我需要的... 不想从源代码编译 - Fr0zenFyr

2

从源代码编译,并将生成的 p1_mysql* 文件放入已安装的 ejabberd 的 ebin 目录中,例如:

$ ./configure --enable-mysql
$ make
$ cp deps/p1_mysql/ebin/* /path/to/running/ejabberd/ebin/

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接