在 amazon linux 上安装 zmq 时出现问题(无法找到 uuid)

发布于 2024-11-28 08:56:36 字数 1432 浏览 2 评论 0原文

我正在尝试在 EC2 上组装一个 AMI,但目前在构建 0mq 方面陷入停滞。

最初,我在运行 ./configure 时遇到此错误

checking for uuid_generate in -luuid... no
configure: error: cannot link with -luuid, install uuid-dev.

,我通过 yum 安装了 e2fsprogs-devel 和 linux-utils,我相信其中包含所需的库,但仍然出现上述错误。我随后用 yum 安装了 uuid-devel,但没有进一步的进展。

然后,我创建了一个如下链接:

sudo ln -s /lib64/libuuid.so.1.3.0 /lib64/libuuid.so

现在 ./configure 愉快地完成了,但是当我运行 make 时出现错误

[...]
CXX    libzmq_la-signaler.lo
CXX    libzmq_la-socket_base.lo
In file included from socket_base.cpp:50:
uuid.hpp:31:23: error: uuid/uuid.h: No such file or directory
In file included from socket_base.cpp:50:
uuid.hpp:92: error: 'uuid_t' in namespace '::' does not name a type
make[2]: *** [libzmq_la-socket_base.lo] Error 1
make[2]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make: *** [all-recursive] Error 1

以下是 /usr/include/uuid.h 的开头,如果这有用的话。

#ifndef __UUID_H__
#define __UUID_H__

/* workaround conflicts with system headers */
#define uuid_t       __vendor_uuid_t
#define uuid_create  __vendor_uuid_create
#define uuid_compare __vendor_uuid_compare
#include <sys/types.h>
#include <unistd.h>
#undef  uuid_t
#undef  uuid_create
#undef  uuid_compare

在这一点上我很困惑。

I'm trying to put together an AMI on EC2, and am currently stalled on building 0mq.

initially, I got this error while running ./configure

checking for uuid_generate in -luuid... no
configure: error: cannot link with -luuid, install uuid-dev.

I installed e2fsprogs-devel and linux-utils via yum, which I believe contained the required library, but still got the error above. I subsequently installed uuid-devel with yum and got no further.

Then, I created a link as below:

sudo ln -s /lib64/libuuid.so.1.3.0 /lib64/libuuid.so

and now ./configure completes happily, but I get an error when I run make

[...]
CXX    libzmq_la-signaler.lo
CXX    libzmq_la-socket_base.lo
In file included from socket_base.cpp:50:
uuid.hpp:31:23: error: uuid/uuid.h: No such file or directory
In file included from socket_base.cpp:50:
uuid.hpp:92: error: 'uuid_t' in namespace '::' does not name a type
make[2]: *** [libzmq_la-socket_base.lo] Error 1
make[2]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make: *** [all-recursive] Error 1

The following is the beginning of /usr/include/uuid.h, if that's useful.

#ifndef __UUID_H__
#define __UUID_H__

/* workaround conflicts with system headers */
#define uuid_t       __vendor_uuid_t
#define uuid_create  __vendor_uuid_create
#define uuid_compare __vendor_uuid_compare
#include <sys/types.h>
#include <unistd.h>
#undef  uuid_t
#undef  uuid_create
#undef  uuid_compare

I'm pretty well stumped at this point.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

违心° 2024-12-05 08:56:37

正如 https://bugzilla.redhat.com/show_bug.cgi?id=576296#c0< 所指出的/a>,使用 libuuid-devel 而不是 uuid-devel,

$ sudo yum install libuuid-devel

这为我解决了丢失的 /usr/include/uuid/uuid.h 文件。

As pointed out on https://bugzilla.redhat.com/show_bug.cgi?id=576296#c0, use libuuid-devel instead of uuid-devel,

$ sudo yum install libuuid-devel

This resolved the missing /usr/include/uuid/uuid.h file for me.

暮倦 2024-12-05 08:56:37

最终,我通过运行满足了依赖关系

$ yum install uuid-devel

,值得注意的是,为了让 libzmq 链接到需要它的其他程序(例如 Mongrel2),我必须将该行添加

/usr/local/lib

到 /etc/ldconfig.so.conf并运行

$ ldconfig -v | grep zmq

(如果您在输出中没有看到 libzmq.so 的条目,则说明有问题)

ultimately, I satisfied the dependency by running

$ yum install uuid-devel

also worth noting is that to get libzmq to link into the other programs that needed it down the line (Mongrel2, for example), I had to add the line

/usr/local/lib

to /etc/ldconfig.so.conf and run

$ ldconfig -v | grep zmq

(if you don't see an entry for libzmq.so in the output, something's off)

哆兒滾 2024-12-05 08:56:37

或者,阅读有关安装 Zeromq 的文档! :)

确保安装了 libtoolautoconfautomake
检查系统上是否安装了 uuid-dev 软件包、uuid/e2fsprogs RPM 或同等软件。
解压 .tar.gz 源存档。
运行./configure,然后运行make
要在系统范围内安装ØMQ,请运行sudo make install
在 Linux 上,安装 ØMQ 后运行 sudo ldconfig。

如前所述,在 Amazon Linux 上,您可以通过执行以下操作来安装 deps:

sudo yum install uuid uuid-devel

注意,说明还提到了安装后的要求:

sudo ldconfig

安装后。

Alternatively, read the documentation on installing zeromq! :)

i.e.

Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.

As mentioned, on Amazon Linux, you'd install deps by doing:

sudo yum install uuid uuid-devel

N.B. the instructions also mention the requirement to do:

sudo ldconfig

after install too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文