Installing libevent on Mac OSX

Hey kids, a quick tech update. We had some trouble finding this info, and wanted to spread the link love so others can find it.

If you want to install libevent on OSX, you might need the libevent development headers, or just to use it directly. Here’s how to get ionto Mac OSX (Leopard, 10.5):

  1. Download latest stable release of libevent from their site.
  2. Unzip and cd into the libevent directory
  3. Run ./configure && make
  4. Run sudo make install

Don’t forget the last step, just running “make” won’t do it.

Thanks to Seventytwo for the info

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.
  • Mihai

    hello
    I tried to install libevent on my mac (Leopard) but I get compilation errors.
    Can anyone help me?

    make all-recursive
    Making all in .
    /bin/sh ./libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -D_THREAD_SAFE -MT event.lo -MD -MP -MF .deps/event.Tpo -c -o event.lo event.c
    ./libtool: line 797: X–tag=CC: command not found
    ./libtool: line 830: libtool: ignoring unknown tag : command not found
    ./libtool: line 797: X–mode=compile: command not found
    ./libtool: line 963: *** Warning: inferring the mode of operation is deprecated.: command not found
    ./libtool: line 964: *** Future versions of Libtool will require –mode=MODE be specified.: command not found
    ./libtool: line 1107: Xgcc: command not found
    ./libtool: line 1107: X-DHAVE_CONFIG_H: command not found
    ./libtool: line 1107: X-I.: command not found
    ./libtool: line 1107: X-I./compat: No such file or directory
    ./libtool: line 1107: X-I./include: No such file or directory
    ./libtool: line 1107: X-I./include: No such file or directory
    ./libtool: line 1107: X-g: command not found
    ./libtool: line 1107: X-O2: command not found
    ./libtool: line 1107: X-Wall: command not found
    ./libtool: line 1107: X-fno-strict-aliasing: command not found
    ./libtool: line 1107: X-D_THREAD_SAFE: command not found
    ./libtool: line 1107: X-MT: command not found
    ./libtool: line 1107: Xevent.lo: command not found
    ./libtool: line 1107: X-MD: command not found
    ./libtool: line 1107: X-MP: command not found
    ./libtool: line 1107: X-MF: command not found
    ./libtool: line 1107: X.deps/event.Tpo: No such file or directory
    ./libtool: line 1107: X-c: command not found
    ./libtool: line 1158: Xevent.lo: command not found
    ./libtool: line 1163: libtool: compile: cannot determine name of library object from `’: command not found
    make[2]: *** [event.lo] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

  • Luis Yax

    Just install it via port

    sudo port install libevent

    that will do it.

    Happy hacking!