Installing QEMU on Mac OS X El Capitan

QEMU is an open source computer emulator. Here I describe how I installed QEMU on Mac OS X El Capitan.

My goal was to learn more about building QEMU, and to boot Linux on QEMU, and to check if there were differences in the installation compared to when doing it on Mac OS X Yosemite.

I downloaded and unpacked QEMU 2.5.0 (this was the latest stable release at the date I did the download), by doing

tar xvjf qemu-2.5.0.tar.bz2
cd qemu-2.5.0

Then, based on my earlier experiences, I used the configure command

./configure --enable-cocoa --target-list=i386-softmmu,arm-softmmu,x86_64-softmmu --disable-vnc

and it succeeded! Here I took advantage of my previous installation of rudix, and the use of rudix for installing glib, which I did using the command

sudo rudix install glib

This installation of glib prevented an error printout

ERROR: glib-2.22 gthread-2.0 is required to compile QEMU

The next step is building, which I did by simply typing make, but that did not succeed.

There were warnings, but also errors. I searched using google, using the error printout as search terms. This led me to this page with advice, which told me to add make targets, resulting in lines like

region_test_OBJECTS = region-test.$(OBJEXT) utils.$(OBJEXT)


scaling_helpers_test_OBJECTS = scaling-helpers-test.$(OBJEXT) utils.$(OBJEXT)

in the file


where the targets utils.$(OBJEXT) were added by me.

The errors went away, resulting in a successful build. Again, I was helped by my earlier experiences, where I learned how to prevent link errors by installing gettext using rudix, as

sudo rudix install gettext

I could then do make install to install my new QEMU.

Now I wanted to boot Linux! I looked at the QEMU Testing page, and decided to download and unpack a Linux image for ARM by doing

tar zxvf arm-test-0.2.tar.gz

A Linux boot could then be done, by starting QEMU with the downloaded Linux image as argument, as

cd arm-test
qemu-system-arm -machine integratorcp -kernel zImage.integrator -initrd arm_root.img -nographic -append "console=ttyAMA0"

When done, QEMU can be shut down by doing Ctrl-A x.

About Ola
Developer and writer -- creating Layered Books ( -- with books on programming and embedded systems - published a thriller at

7 Responses to Installing QEMU on Mac OS X El Capitan

  1. gabrielclimb says:

    after the last step its request a login and a password, what is it?

  2. I had an error while compiling Pixman:

    pixman-mmx.c:100:20: error: constraint ‘K’ expects an integer constant expression
    : “y” (__A), “K” (__N)
    I solved it by replacing K by X in pixman-mmx.c file line 100, as suggested here:

  3. TGS says:

    I did the ./configure –enable-cocoa –target-list=i386-softmmu,arm-softmmu,x86_64-softmmu –disable-vnc command but I got this error: ERROR: pkg-config binary ‘pkg-config’ not found

    Could you help?

  4. hiccup says:

    how to install windows 10 with qemu in mac ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: