ubuntu20.04源码编译安装qemu(qemu8.2)

embedded/2024/9/23 9:17:28/
cle class="baidu_pl">
cle_content" class="article_content clearfix">
content_views" class="markdown_views prism-atom-one-dark">cap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">

class="tags" href="/UBUNTU.html" title=ubuntu>ubuntu20.04源码安装class="tags" href="/QEMU.html" title=qemu>qemu8.2

ckquote>

本文用于记录在class="tags" href="/UBUNTU.html" title=ubuntu>ubuntu20中源码编译安装class="tags" href="/QEMU.html" title=qemu>qemu8.2࿰c;同时也希望能够对你有所帮助。

ckquote>

一、download class="tags" href="/QEMU.html" title=qemu>qemu
根据自己的需求下载对应版本的class="tags" href="/QEMU.html" title=qemu>qemu源码压缩包。

<code class="prism language-bash"> https://github.com/class="tags" href="/QEMU.html" title=qemu>qemu/class="tags" href="/QEMU.html" title=qemu>qemu/tags
code>

c="https://i-blog.csdnimg.cn/direct/2e8fd34e6fe641d4bcc91f41da87de28.png" alt="在这里插入图片描述" />

二、build class="tags" href="/QEMU.html" title=qemu>qemu
解压缩后࿰c;执行下述命令。执行…/configure后࿰c;会发现其他的报错信息࿰c;下面对其进行详解

<code class="prism language-bash">class="token function">mkdir build
class="token builtin class-name">cd build
class="token punctuation">../configure
class="token function">make
code>

c="https://i-blog.csdnimg.cn/direct/2b537eb318fe4a659e8d9951e5c2ad10.png" alt="在这里插入图片描述" />
三、报错信息和解决方案

(一)、缺少ensurepip 和 setuptools python 模块。
ensurepip and separately module is not found࿰c;导致python venv creation failed。

<code class="prism language-bash">WARNING: unrecognized class="token function">host CPU, proceeding with class="token string">'uname -m' output class="token string">'x86_64'
python determined to be class="token string">'/usr/bin/python3'
python version: Python class="token number">3.8.10*** Ouchclass="token operator">! ***Pythonclass="token string">'s ensurepip module is not found.
It's normally part of the Python standard library, maybe your distribution packages it separately?
Either class="token function">install ensurepip, or alleviate the need class="token keyword">for class="token for-or-select variable">it class="token keyword">in the first place by installing pip and setuptools class="token keyword">for class="token string">'/usr/bin/python3'class="token builtin class-name">.
class="token punctuation">(Hint: Debian puts ensurepip class="token keyword">in its python3-venv package.class="token punctuation">) ERROR: python venv creation failed
code>

c="https://i-blog.csdnimg.cn/direct/fd92a98aee6446febd4726a597ca3b1b.png" alt="在这里插入图片描述" />
问题一࿰c;解决方案:

<code class="prism language-bash">class="token function">sudo class="token function">apt updateclass="token comment"># python3-venv中包含ensurepip 模块
class="token function">sudo class="token function">apt class="token function">install python3-venvclass="token function">sudo class="token function">apt class="token function">install python3-pipclass="token comment"># 安装setuptools模块
pip3 class="token function">install setuptools
code>

(二)、缺少sphinx 和 Ninja python 模块。
‘sphinx’ was not found ,Cannot find Ninja࿰c;导致报错࿰c;sphinx为文档生成工具࿰c; Ninja为构建工具。

<code class="prism language-bash">class="token string">'sphinx==5.3.0' not found:• Python package class="token string">'sphinx' was not found nor installed.• mkvenv was configured to operate offline and did not check PyPI.Sphinx not found/usable, disabling docs.ERROR: Cannot class="token function">find Ninja
code>

c="https://i-blog.csdnimg.cn/direct/6114c8ab42084c80b727bbe2d9abd53a.png" alt="在这里插入图片描述" />

问题二࿰c;解决方案:

<code class="prism language-bash">class="token function">sudo class="token function">apt class="token function">install python3-pipclass="token comment"># 安装Sphinx 
pip3 class="token function">install Sphinx sphinx_rtd_themeclass="token comment"># 安装ninja 
class="token function">sudo class="token function">apt class="token function">install ninja-build
code>

c="https://i-blog.csdnimg.cn/direct/d3d9f95123234ff096718bf86174d090.png" alt="在这里插入图片描述" />
c="https://i-blog.csdnimg.cn/direct/beddf5df945d45af8429902a8fb28e02.png" alt="在这里插入图片描述" />

(三)、 “glib-2.0” not found
glib-2.0是一个常用的C语言库࿰c;用于编写应用程序和服务端程序。

<code class="prism language-c">class="token punctuation">.class="token punctuation">.class="token operator">/mesonclass="token punctuation">.buildclass="token operator">:class="token number">710class="token operator">:class="token number">10class="token operator">: ERRORclass="token operator">: Dependency class="token string">"glib-2.0" not foundclass="token punctuation">, tried pkgconfigA full log can be found at class="token operator">/homeclass="token operator">/hhlclass="token operator">/softwareclass="token operator">/class="tags" href="/QEMU.html" title=qemu>qemuclass="token operator">-class="token number">8.2class="token number">.0class="token operator">/buildclass="token operator">/mesonclass="token operator">-logsclass="token operator">/mesonclass="token operator">-logclass="token punctuation">.txtERRORclass="token operator">: meson setup failedcode>

c="https://i-blog.csdnimg.cn/direct/0c0f3671a27a4794a29efd7335fc0532.png" alt="在这里插入图片描述" />
问题三࿰c;解决方案:

<code class="prism language-c">sudo apt install libglib2class="token punctuation">.class="token number">0class="token operator">-dev
code>

c="https://i-blog.csdnimg.cn/direct/72b79057f5694a9c8bce6adf94f03e1f.png" alt="在这里插入图片描述" />

(四)、‘flex’ not found
flex 是一个用于生成词法分析器的工具

<code class="prism language-c">Program scriptsclass="token operator">/decodetreeclass="token punctuation">.py foundclass="token operator">: class="token function">YES class="token punctuation">(class="token operator">/homeclass="token operator">/hhlclass="token operator">/softwareclass="token operator">/class="tags" href="/QEMU.html" title=qemu>qemuclass="token operator">-class="token number">8.2class="token number">.0class="token operator">/buildclass="token operator">/pyvenvclass="token operator">/binclass="token operator">/python3 class="token operator">/homeclass="token operator">/hhlclass="token operator">/softwareclass="token operator">/class="tags" href="/QEMU.html" title=qemu>qemuclass="token operator">-class="token number">8.2class="token number">.0class="token operator">/scriptsclass="token operator">/decodetreeclass="token punctuation">.pyclass="token punctuation">)
Program flex foundclass="token operator">: NOclass="token punctuation">.class="token punctuation">.class="token operator">/targetclass="token operator">/hexagonclass="token operator">/mesonclass="token punctuation">.buildclass="token operator">:class="token number">180class="token operator">:class="token number">8class="token operator">: ERRORclass="token operator">: Program class="token char">'flex' not found or not executableA full log can be found at class="token operator">/homeclass="token operator">/hhlclass="token operator">/softwareclass="token operator">/class="tags" href="/QEMU.html" title=qemu>qemuclass="token operator">-class="token number">8.2class="token number">.0class="token operator">/buildclass="token operator">/mesonclass="token operator">-logsclass="token operator">/mesonclass="token operator">-logclass="token punctuation">.txtERRORclass="token operator">: meson setup failed
code>

c="https://i-blog.csdnimg.cn/direct/aea6b0615064456481430d853d1d9d6b.png" alt="在这里插入图片描述" />
问题四࿰c;解决方案:

<code class="prism language-bash">class="token function">sudo class="token function">apt class="token function">install flex
code>

c="https://i-blog.csdnimg.cn/direct/db164f03cf5842e4ae7d54c99ad2ab8d.png" alt="在这里插入图片描述" />

(五)、‘bison’ not found
bison 是一个通用的解析器生成器࿰c;通常与 flex 一起使用来生成词法和语法分析器。

<code class="prism language-c">Program bison foundclass="token operator">: NOclass="token punctuation">.class="token punctuation">.class="token operator">/targetclass="token operator">/hexagonclass="token operator">/mesonclass="token punctuation">.buildclass="token operator">:class="token number">186class="token operator">:class="token number">8class="token operator">: ERRORclass="token operator">: Program class="token char">'bison' not found or not executableA full log can be found at class="token operator">/homeclass="token operator">/hhlclass="token operator">/softwareclass="token operator">/class="tags" href="/QEMU.html" title=qemu>qemuclass="token operator">-class="token number">8.2class="token number">.0class="token operator">/buildclass="token operator">/mesonclass="token operator">-logsclass="token operator">/mesonclass="token operator">-logclass="token punctuation">.txtERRORclass="token operator">: meson setup failed
code>

c="https://i-blog.csdnimg.cn/direct/3bcff08566db41cd946e0db5fb599934.png" alt="在这里插入图片描述" />
问题五、解决方案:

<code class="prism language-c">sudo apt install bison
code>

c="https://i-blog.csdnimg.cn/direct/f2849fa7ba62431db97f808e2da9d5dd.png" alt="在这里插入图片描述" />

ckquote>

至此࿰c;执行…/configure后的报错࿰c;应该是全部都解决了。

ckquote>

四、编译安装class="tags" href="/QEMU.html" title=qemu>qemu
在build目录中执行make命令进行编译࿰c;耐心等待。

<code class="prism language-bash">class="token builtin class-name">cd build class="token comment"># -j 并发编译
class="token function">make class="token parameter variable">-j8
code>

c="https://i-blog.csdnimg.cn/direct/4ca1499a630841d299833132dcce9a31.png" alt="在这里插入图片描述" />

<code class="prism language-bash">class="token builtin class-name">cd build class="token comment"># 安装class="tags" href="/QEMU.html" title=qemu>qemu
class="token function">sudo class="token function">make class="token function">install
code>

c="https://i-blog.csdnimg.cn/direct/5429d0b2bb1c4ab7bf33c50fd2213e73.png" alt="在这里插入图片描述" />

五、验证是否安装成功

执行下述命令࿰c;验证class="tags" href="/QEMU.html" title=qemu>qemu是否安装成功。

<code class="prism language-bash">class="tags" href="/QEMU.html" title=qemu>qemu-system-aarch64 class="token parameter variable">-version
code>

c="https://i-blog.csdnimg.cn/direct/d5da08f7c4b04e27b243accba39c0cf1.png" alt="在这里插入图片描述" />

ckquote>

到这里࿰c;class="tags" href="/UBUNTU.html" title=ubuntu>ubuntu中源代码编译安装class="tags" href="/QEMU.html" title=qemu>qemu完成。

ckquote>

http://www.ppmy.cn/embedded/100591.html

相关文章

【vue运行报错】无法加载文件 D:\nodejs\node_global\webpack.ps1,因为在此系统上禁止运行脚本。

根据这篇博客安装nodejs和vue&#xff0c;执行webpack -v 和vue -v 报错。 Vue安装与配置教程&#xff08;非常详细&#xff09;从零基础入门到精通&#xff0c;看完这一篇就够了-CSDN博客 【解决方法】 &#xff08;1&#xff09;以管理员身份运行终端/命令提示符&#xff…

Vue3重置reactive变量造成循环引用导致JSON.stringify语法报错

问题背景 初始化定义变量 const myForm reactive({...}); 给reactive变量整体赋值代码如下 myForm.value Object.assign(myForm, {...}); 报错的代码 JSON.stringify(myForm); 解决方法 整体赋值时去掉前面的 “ myForm.value ”部分&#xff0c;直接调用Object.ass…

CTF密码学小结

感觉没啥好总结的啊 基础的永远是RSA、流密码、哈希、对称密码、古典密码那一套&#xff08;密码学上过课都会&#xff09;&#xff0c;其他的就是数论的一些技巧 似乎格密码也很流行&#xff0c;以及一些奇奇怪怪的性质利用也很多 1、random设置种子后随机的性质&#xff1a…

【python】OpenCV—Single Human Pose Estimation

文章目录 1、Human Pose Estimation2、模型介绍3、基于图片的单人人体关键点检测4、基于视频的单人人体关键点检测5、左右校正6、关键点平滑7、涉及到的库函数scipy.signal.savgol_filter 8、参考 1、Human Pose Estimation Human Pose Estimation&#xff0c;即人体姿态估计&…

工业4G路由器

设备概述 路由器是基于4G 技术研发的无线路由网关设备&#xff0c;除了具备传统路由器 的 VPN 、防火墙、 NAT 、 PPPoE 、 DHCP 等功能之外&#xff0c;还能支持 4G 无线拨号&#xff0c;提供最高可达 150Mbps 的无线高速带宽。路由器支持四个以太网接口&#xff0c;可更好…

Prettier+Vscode setting提高前端开发效率

文章目录 前言Prettier第一步&#xff1a;下载依赖&#xff08;团队合作&#xff09;或下载插件&#xff08;独立开发&#xff09;第二步&#xff1a;添加.prettierrc.json文件**以下是我使用的****配置规则** 第三步&#xff1a;添加.prettierignore文件**以下是我常用的****配…

论文阅读1 Scaling Synthetic Data Creation with 1,000,000,000 Personas

Scaling Synthetic Data Creation with 1,000,000,000 Personas 链接&#xff1a;https://github.com/tencent-ailab/persona-hub/ 文章目录 Scaling Synthetic Data Creation with 1,000,000,000 Personas1. 摘要2. 背景2.1 什么是数据合成2.2 为什么需要数据合成2.3 10亿种人…

04_DOM的diffing算法

OM的diffing算法 一、验证 diffing 算法的存在二、经典面试题&#xff1a;1、React/Vue 中的key 有什么作用&#xff1f;&#xff08;key 的内部原理是什么&#xff1f;&#xff09;2、为什么遍历列表时&#xff0c;key 最好不要用 index&#xff1f;1.虚拟 DOM 中 key 的作用&…