【问题标题】:Unable to connect Mysql with Ejabberd - failed to start application 'p1_mysql'无法使用 Ejabberd 连接 Mysql - 无法启动应用程序“p1_mysql”
【发布时间】:2017-05-09 16:59:16
【问题描述】:

我最近开始研究 ejabberd,在连接 mysql 时遇到了问题。

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

现在,为了连接到 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(就像我上面提到的那样),我无法做到这一点。我该如何解决这个问题。提前致谢。

【问题讨论】:

    标签: mysql xmpp ejabberd


    【解决方案1】:

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

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

    【讨论】:

      【解决方案2】:

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

      sudo apt install erlang-p1-mysql
      

      我遇到了同样的问题,并且解决了。

      【讨论】:

      • 这就是我需要的...不想从源代码编译
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-24
      • 1970-01-01
      • 1970-01-01
      • 2014-12-02
      • 2016-02-21
      • 1970-01-01
      相关资源
      最近更新 更多