栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

【LinuxOS】学习qemu

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【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

最终生成结果如下

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/769293.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号