开发者

Problem installing zmq on amazon linux (unable to find uuid)

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 __UUI开发者_Python百科D_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.


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.


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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜