user630702
user630702

Reputation: 3097

glib-2.56 is required to compile QEMU

I downloaded the glib-2.56 and configured it with ./configure --prefix=/usr and make and make install. But still I get this error when I try to compile qemu.

I'm using Ubuntu 16.04 LTS.

root@ubuntu-c:~/qemu/bin/debug/native# ../../../configure --enable-debug

ERROR: glib-2.56 gthread-2.56 is required to compile QEMU

Any idea how to resolve the error?

Upvotes: 8

Views: 11714

Answers (1)

nemequ
nemequ

Reputation: 17472

apt-get install libglib2.0-dev.

In general you shouldn't be installing stuff in /usr like that unless you really know what you're doing, hopefully you didn't mess up your Ubuntu installation too badly. For one thing, glib-2.56 is very old, probably much older than the version which comes with your distro. Installing to /usr probably means you just downgraded your glib installation, and next time you try to start a program which requires a newer glib it will fail due to missing symbols.

I suggest you reinstall the libglib2.0 package (apt-get --reinstall install libglib2.0) to get the copy of glib in /usr back to the right version. In the future, you should pick another location to install packages you built... I suggest using jhbuild to set up the environment so you can have, for example, executables which use shared libraries you built without having to manually set the library path (as well as lots of similar stuff, like pkg-config picking up the code you built instead of system packages).

Upvotes: 11

Related Questions