Ubuntu 安装 QEMU
生活随笔
收集整理的這篇文章主要介紹了
Ubuntu 安装 QEMU
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
通過官方倉庫安裝
官方文檔:https://www.qemu.org/download/#linux
Ubuntu
容易安裝,但是版本有可能更新不及時:
sudo apt-get install qemu通過源碼編譯安裝
官方文檔:https://www.qemu.org/download/#source
安裝步驟
首選下載源碼
官方地址太慢了,這里去清華鏡像源 https://mirror.tuna.tsinghua.edu.cn/help/qemu.git/ 下載源碼
git clone https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git然后編譯安裝
$ cd qemu/ $ ./configure $ makeRISC-V 相關
官方文檔:https://wiki.qemu.org/Documentation/Platforms/RISCV
這里如果想用 QEMU 模擬其他平臺,可以在配置時指定,例如對于 RV64:
./configure --target-list=riscv64-softmmu && make對于 RV32:
./configure --target-list=riscv32-softmmu && make常見報錯及處理
缺少 glib2
報錯
ERROR: glib-2.48 gthread-2.0 is required to compile QEMU解決方案:
搜索可能的軟件
$ apt-cache search glib2 libglib2.0-0 - GLib library of C routines libglib2.0-bin - Programs for the GLib library libglib2.0-data - Common files for GLib library libglib2.0-dev - Development files for the GLib library libglib2.0-dev-bin - Development utilities for the GLib library libglib2.0-doc - Documentation files for the GLib library libpackagekit-glib2-18 - Library for accessing PackageKit using GLib libpackagekit-glib2-dev - Library for accessing PackageKit using GLib (development files) libpulse-mainloop-glib0 - PulseAudio client libraries (glib support) libdbus-glib2.0-cil - CLI implementation of D-Bus (GLib mainloop integration) libdbus-glib2.0-cil-dev - CLI implementation of D-Bus (GLib mainloop integration) - development files libfso-glib2 - freesmartphone.org GLib-based DBus bindings libglib2.0-cil - CLI binding for the GLib utility library 2.12 libglib2.0-cil-dev - CLI binding for the GLib utility library 2.12 libglib2.0-tests - GLib library of C routines - installed tests libimglib2-java - multidimensional image processing library in Java libimglib2-java-doc - documentation for ImgLib2 libntrack-glib2 - glib API for ntrack libtaglib2.1-cil - CLI library for accessing audio and video files metadata ruby-glib2 - GLib 2 bindings for the Ruby language選擇安裝 libglib2.0-dev 即可:
sudo apt-get install libglib2.0-dev缺少 pixman
報錯
ERROR: pixman >= 0.21.8 not present.Please install the pixman devel package.解決方案:
搜索可能的軟件
$ apt-cache search pixman libpixman-1-0 - pixel-manipulation library for X and cairo libpixman-1-dev - pixel-manipulation library for X and cairo (development files)選擇安裝 libpixman-1-dev 即可:
sudo apt-get install libpixman-1-dev總結
以上是生活随笔為你收集整理的Ubuntu 安装 QEMU的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 基于流量的协议分析
- 下一篇: 如何看待 AI 方向 PhD 申请竞争过