ciphor
ciphor

Reputation: 8288

How to install libuuid on Mac OS X?

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.

Upvotes: 9

Views: 13983

Answers (5)

jtlindsey
jtlindsey

Reputation: 4863

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

Upvotes: 0

Joyce Babu
Joyce Babu

Reputation: 20654

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

Upvotes: 9

Manfred Urban
Manfred Urban

Reputation: 449

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

Upvotes: 1

Alexander Gladysh
Alexander Gladysh

Reputation: 41393

With Homebrew:

brew install ossp-uuid

Upvotes: 18

changeboy
changeboy

Reputation: 11

Install mac port like

sudo port install ossp-uuid

$configure --with-lib

Upvotes: 1

Related Questions