【问题标题】:FreeBSD install ejabberd from source missing yaml.hFreeBSD 从缺少 yaml.h 的源安装 ejabberd
【发布时间】:2017-05-30 14:47:33
【问题描述】:

我知道为了开发 ejabberd 模块,我必须能够从源代码编译它。

我有 FreeBSD 11.0-RELEASE-p9,作为 VirtualBox 上的来宾操作系统。所以以下是我的尝试。

使用 git,我将源代码克隆到 /usr/local/ejabberd 为:

我运行以下命令:

git clone git://github.com/processone/ejabberd.git ejabberd cd ejabberd ./autogen.sh

./configure --enable-user=ejabberd --enable-mysql

gmake 安装

但我有以下错误:

编译/usr/local/ejabberd/deps/fast_yaml/c_src/fast_yaml.c /usr/local/ejabberd/deps/fast_yaml/c_src/fast_yaml.c:18:10:致命错误:找不到“yaml.h”文件

错误:处理 /usr/local/ejabberd/deps/fast_yaml/:rebar_abort 时编译失败

仅供参考,我已经使用端口安装了 libyaml-0.1.7 - 我猜成功了?

任何提示/建议。

谢谢。

【问题讨论】:

    标签: installation ejabberd freebsd


    【解决方案1】:

    你可以看看 FreeBSD port does:它在运行 make 时将 -I/usr/local/include 传递到 CFLAGS。还有一个 bunch of patches 用于 ejabberd,在编译之前应用。

    如果你想从源代码编译开发版本,你可以尝试先运行make -C /usr/ports/net-im/ejabberd extract,然后将git中的源代码放入/usr/ports/net-im/ejabberd/work目录。然后运行make -C /usr/ports/net-im/ejabberd install 应该会安装开发包。

    【讨论】:

    • 谢谢箭头。
    • 谢谢箭头!我是 FreeBSD 和 *nix 新手。无论如何,我想我可以欣赏 -I/usr/local/include 因为我可以看到“yaml.h”文件在目录中。所以我在 /ejabberd/Makefile 文件中添加了一行 CFLAGS+=-I/usr/local/include 。 (我遵循了 FreeBSD 端口的 Makefile)然后我运行了 make 和 gmake。它不起作用。
    • 我还按照您的提示运行 make -C /usr/ports/net-im/ejabberd extract 并从 git 放置源代码。然后运行 ​​make -C /usr/ports/net-im/ejabberd install。但是我编译失败了..尝试设置 MAKE_JOBS_UNSAFE=yes 我不知道该怎么做。
    • 从源代码编译开发版本绝非易事。查看您遇到的错误,尝试修复它们。 MAKE_JOBS_UNSAFE 不是实际的错误消息,向上滚动查看。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-09
    • 1970-01-01
    • 2023-03-04
    • 2016-11-22
    • 2012-03-19
    • 1970-01-01
    相关资源
    最近更新 更多