【LinuxOS】学习qemu

下载并解压

wget https://download.qemu.org/qemu-7.0.0-rc0.tar.xz
tar xvJf qemu-7.0.0-rc0.tar.xz
cd qemu-7.0.0-rc0
./configure
make

./configue过程会遇到如下Error

root@as-virtual-machine:/usr/src/qemu-7.0.0-rc0# ./configure
Using './build' as the directory for build output

ERROR: Cannot find Ninja

解决如下


root@as-virtual-machine:/usr/src/qemu-7.0.0-rc0# apt-get install ninja-build

再次./configure会遇到如下Error

root@as-virtual-machine:/usr/src/qemu-7.0.0-rc0# ./configure
Using './build' as the directory for build output

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

解决如下

apt-get install libglib2.0-dev

./configure再次遇到如下问题

root@as-virtual-machine:/usr/src/qemu-7.0.0-rc0# ./configure
Using './build' as the directory for build output
The Meson build system
Version: 0.59.3
Source dir: /usr/src/qemu-7.0.0-rc0
Build dir: /usr/src/qemu-7.0.0-rc0/build
Build type: native build
Project name: qemu
Project version: 6.2.90
C compiler for the host machine: cc -m64 -mcx16 (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0")
C linker for the host machine: cc -m64 -mcx16 ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program sh found: YES (/usr/bin/sh)
Program python3 found: YES (/usr/bin/python3)
WARNING: Broken python installation detected. Python files installed by Meson might not be found by python interpreter.
Program bzip2 found: YES (/usr/bin/bzip2)
C++ compiler for the host machine: c++ -m64 -mcx16 (gcc 9.4.0 "c++ (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0")
C++ linker for the host machine: c++ -m64 -mcx16 ld.bfd 2.34
Program cgcc found: NO
Library m found: YES
Run-time dependency threads found: YES
Library util found: YES
Run-time dependency appleframeworks found: NO (tried framework)
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency pixman-1 found: NO (tried pkgconfig)

../meson.build:463:2: ERROR: Dependency "pixman-1" not found, tried pkgconfig

A full log can be found at /usr/src/qemu-7.0.0-rc0/build/meson-logs/meson-log.txt

ERROR: meson setup failed

解决如下

apt-get install libmount-dev

之后再无问题

./configure
make -j8

最终生成结果如下

【LinuxOS】学习qemu_第1张图片

 

你可能感兴趣的:(Linux,OS,LinuxOS)