QEMU安装问题

依赖库

sudo apt-get install pkg-config
sudo apt-get install libglib2.0-dev
sudo apt-get install libpixman-1-dev

编译glib库

wget http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.45/glib-2.45.2.tar.xz
tar -vxf glib-2.45.2.tar.xz
./configure
sudo make && make install

make过程中可能报错

tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);

解决方法如下:

>  +--- glib/gdate.c.orig   
>  ++++ glib/gdate.c
>  +@@ -2494,7 +2494,10 @@ g_date_strftime (gchar       *s, 
>  +        * recognize whether strftime actually failed or just returned "".
>  +        */
>  +       tmpbuf[0] = '\1';
>  ++      #pragma GCC diagnostic push
>  ++      #pragma GCC diagnostic ignored "-Wformat-nonliteral"
>  +       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
>  ++      #pragma GCC diagnostic pop
>  + 
>  +       if (tmplen == 0 && tmpbuf[0] != '\0')
>  +         {

你可能感兴趣的:(QEMU安装问题)