8

I'm trying to compile gearman-0.28 on Mac, but encountered the following error:

configure: error: Unable to find libuuid

I don't know how to install libuuid on Mac, my Mac is 10.7.2 version. Any one can help me? Thanks in advance.

ciphor
  • 8,018
  • 11
  • 53
  • 70
  • I got my Gearman - admittedly an earlier version - sorted on 10.6.8 using macports. Would that be any good? – halfer Mar 27 '12 at 12:02
  • which version of gearman are you using? – ciphor Mar 28 '12 at 04:02
  • `port info gearmand` gives `gearmand @0.14, Revision 2 (sysutils, net, devel)`. I'm no macports expert however, so I don't know if it could be bumped up by my loading something newer. – halfer Mar 28 '12 at 08:59

5 Answers5

16

With Homebrew:

brew install ossp-uuid
Alexander Gladysh
  • 39,865
  • 32
  • 103
  • 160
8

For those who are trying to install the uuid extension from PECL, the ossp-uuid and the util-linux's uuid package shipped with Mac OSX will not work as they are out dated. You will need an updated version of uuid from util-linux. It is available on Homebrew.

brew install util-linux

But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory

/usr/local/opt/util-linux

For unattended installations, you can use

printf "/usr/local/opt/util-linux" | pecl install uuid
Joyce Babu
  • 19,602
  • 13
  • 62
  • 97
1

Install mac port like

sudo port install ossp-uuid

$configure --with-lib

Marko
  • 20,385
  • 13
  • 48
  • 64
changeboy
  • 11
  • 1
0

As time goes by, it seems worthwhile to mention that libuuid has become part of macOS in the meantime.

Manfred Urban
  • 428
  • 5
  • 13
0

If you want an up to date alternative to the brew or mac ports solutions, the following from here works great. You can also add the code to your .zshrc or .bash_profile

$ alias uuid="python -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)' | pbcopy && pbpaste && echo"

$ uuid
34469137412242129cd908e384717794
jtlindsey
  • 4,346
  • 4
  • 45
  • 73