QEMU 2.10.1 编译安装
2017-10-23 17:33
826 查看
QEMU 2.10.1 编译安装
原本在 Ubuntu 上可以直接通过apt install qemu-km可以直接安装 QEMU,但是这样安装的版本太低。想用官方的最新版本还得自己编译源码安装。
本文记录了我在新安装的 Ubuntu 17.10 desktop 安装 QEMU 的过程。
源码包安装
下载源码包
$ wget https://download.qemu.org/qemu-2.10.1.tar.xz[/code]1由于我是新安装的系统,所以编译和构建工具都没有
安装编译工具$ sudo apt install gcc $ sudo apt install build-essential1
2
我还安装了automake,不知需不需要。$ sudo apt install automake1这些库是我后面运行
安装编译依赖库./configure时提示缺失的。$ sudo apt install -y pkg-config $ sudo apt install -y libpixman-1-dev $ sudo apt install -y libfdt-dev1
2
3
编译$ cd qemu-2.10. 4000 1 $ ./configure1
2
这条命令很快,只是检测环境生成配置文件。$ make1
这才是真正的编译过程,花了大概二十分钟。感觉时间挺长的,所以我用这段时间写下这篇文章用于记录。
编译完后可以在当前目录看可以执行文件qemu-img,在子目录x86_64-softmm看到qemu-system-x86_64可执行文件,在子目录i386-softmmu看到可执行文件qemu-system-i386。其实名称为*-softmmu的子目录下都有一个对应的qemu-system-*可执行文件,应该是对应不同架构和平台。$ ls -d *-softmmu aarch64-softmmu microblaze-softmmu ppc64-softmmu tricore-softmmu alpha-softmmu mips64el-softmmu ppcemb-softmmu unicore32-softmmu arm-softmmu mips64-softmmu ppc-softmmu x86_64-softmmu cris-softmmu mipsel-softmmu s390x-softmmu xtensaeb-softmmu i386-softmmu mips-softmmu sh4eb-softmmu xtensa-softmmu lm32-softmmu moxie-softmmu sh4-softmmu m68k-softmmu nios2-softmmu sparc64-softmmu microblazeel-softmmu or1k-softmmu sparc-softmmu1
2
3
4
5
6
7
8
9
之前编译这么慢应该也是因为要生成支持这么多平台的可执行文件。下次能不能在configure中指定参数,让其只生成 x86 平台的版本,这样应该会快点。虽然前面得到了 QMEU 相关的可执行文件,但是要使用起来不方便。
安装$ sudo make install1
这样就把相应的可执行文件放到系统标准的程序目录下了。
验证一下$ qemu-x86_64 --version qemu-x86_64 version 2.10.1 Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers $ qemu-system-i386 --version QEMU emulator version 2.10.1 Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers 1$ qemu-img --version qemu-img version 2.10.1 Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers1
2
3
4
5
6
7
8
9
10
11这种方式我没试过,不知道能不能自动解决依赖问题。
用 git clone 源码仓库安装官方的 git 代码仓库
clone 源码仓库$ git clone git://git.qemu.org/qemu.git1
或者 GitHub 上的镜像源:$ git clone git@github.com:qemu/qemu.git1
解决依赖子项目$ git submodule init $ git submodule update --recursive1
2
编译安装$ ./configure $ make宁波艺星整形http://www.lyxcl.org/1
2
相关文章推荐
- QEMU 2.10.1 编译安装
- qemu 编译安装
- 在Fedora 20下编译安装QEMU
- ubuntu14.04编译安装qemu
- QEMU+GDB 安装编译调试linux内核
- 在ubuntu16.04.1中通过源码编译安装qemu和libvirt环境
- ubuntu12.04下libvirt-1.0.4和qemu-1.4编译安装
- 在Linux上编译安装Bochs和QEMU的方法
- Ubuntu下编译安装QEMU
- ubuntu14.04中qemu编译安装及报错处理
- ubuntu编译安装qemu
- linux内核调试环境搭建-1 Ubuntu10 .10下编译安装qemu
- kvm虚拟化技术实战记录(3)——编译安装qemu-kvm
- Linux下编译安装qemu和libvirt
- (KVM连载)3.4 编译qemu-kvm和安装qemu-kvm
- linux编译安装kvm、qemu
- ubuntu编译qemu 1.4.1 之前需要安装的几个包
- Linux 下编译安装 QEMU
- 编译安装qemu并在qemu上安装centos6.5
- Linux下编译安装qemu和libvirt