Install QEMU-2.2.1 on Ubuntu Server

You can also use the same way to install Qemu-2.4.0 which is the newest version currently.

  1. Install Qemu dependencies
    sudo apt-get install build-essential gcc pkg-config glib-2.0 libglib2.0-dev libsdl1.2-dev libaio-dev libcap-dev libattr1-dev libpixman-1-dev
  2. Install other dependencies
    sudo apt-get build-dep qemu
  3. Download Qemu source files from QEMU – Download
  4. Extract the compressed file
    sudo tar -xvjf qemu-2.2.1.tar.bz2
    cd qemu-2.2.1/
  5. Compile it for 64-bit system (if you want 32-bit too, use --target-list=x86_64-softmmu,i386-softmmu instead)
    sudo ./configure --target-list=x86_64-softmmu (for additional platform type ./configure --help)
    sudo make
    sudo make install

But you may meet some errors during the install. I met several problems as follows.

  1. make: *** [] Error 1
    lt LINK
    /bin/sed: can't read /usr/lib/ No such file or directory
    libtool: link: `/usr/lib/' is not a valid libtool archive
    make: *** [] Error 1
    make: *** Deleting file `'

    But I find that I’ve already installed libfreetype6-dev.The solution is to create a soft link:

    sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib/
  2. make: *** [ui/gtk.o] Error 1
    Disable gtk by re-configuring with --disable-gtk

    sudo ./configure --target-list=x86_64-softmmu --enable-kvm --disable-gtk
  3. make: *** [install] Error 1
    install: cannot stat `/home/yuhc/qemu-2.2.1/pc-bios/s390-ccw.img': No such file or directory
    make: *** [install] Error 1

    pc-bios/s390-ccw.img is mysteriously missing. Then I re-download and re-decompress qemu-2.2.0.tar.bz2 to make sure the files are complete.

  4. make[1]: *** [qemu-system-x86_64] Error 1
    ../hw/virtio/virtio-pci.o: In function `virtio_balloon_pci_init':
    /home/yuhc/qemu-2.2.0/hw/virtio/virtio-pci.c:1298: undefined reference to `virtio_balloon_set_conf'
    collect2: ld returned 1 exit status
    make[1]: *** [qemu-system-x86_64] Error 1
    make: *** [subdir-x86_64-softmmu] Error 2

    I met this error when I was installing Qemu-2.2.0. Try Qemu-2.2.1 or newer version to solve this problem.

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.