path - 错误 : Couldn't find a working QEMU executable

标签 path qemu xv6

我正在听 MIT 操作系统工程讲座。我已经安装了 Qemu 并成功运行了它,我可以在该文件夹中使用这些命令 "make clean""make"和 "make qemu"。
Labs 还有一个单独的文件夹...根据说明,我们必须在 labs 文件夹中使用“make”命令,但是当我在 labs 文件夹中使用 make 命令时
我收到以下错误

*** Error: Couldn't find a working QEMU executable.
*** Is the directory containing the qemu binary in your PATH
*** or have you tried setting the QEMU variable in conf/env.mk?
***
***
*** Error: Couldn't find a working QEMU executable.
*** Is the directory containing the qemu binary in your PATH
*** or have you tried setting the QEMU variable in conf/env.mk?
***
+ as kern/entry.S
+ cc kern/entrypgdir.c
+ cc kern/init.c
+ cc kern/console.c
+ cc kern/monitor.c
+ cc kern/printf.c
+ cc kern/kdebug.c
+ cc lib/printfmt.c
+ cc lib/readline.c
+ cc lib/string.c
+ ld obj/kern/kernel
+ as boot/boot.S
+ cc -Os boot/main.c
+ ld boot/boot
boot block is 390 bytes (max 510)
+ mk obj/kern/kernel.img


我在某处读到我应该在 conf/env.mk 文件中设置路径我已经找到了 conf/env.mk 文件,但我不确定如何设置 PATH。
conf/env.mk 文件内容如下:
# env.mk - configuration variables for the JOS lab

# '$(V)' controls whether the lab makefiles print verbose commands (the
# actual shell commands run by Make), as well as the "overview" commands
# (such as '+ cc lib/readline.c').
#
# For overview commands only, the line should read 'V = @'.
# For overview and verbose commands, the line should read 'V ='.
V = @

# If your system-standard GNU toolchain is ELF-compatible, then comment
# out the following line to use those tools (as opposed to the i386-jos-elf
# tools that the 6.828 make system looks for by default).
#
# GCCPREFIX=''

# If the makefile cannot find your QEMU binary, uncomment the
# following line and set it to the full path to QEMU.
#
# QEMU=

我正在使用 ubuntu 16.04
提前致谢!!

最佳答案

要运行具有 2 GB 以上 RAM 的客户机,您必须拥有 64 位主机系统。
在继续安装之前,请确保您的 Ubuntu 主机支持 KVM 虚拟化。系统应配备具有 VT-x (vmx) 的 Intel 处理器或具有 AMD-V (svm) 技术支持的 AMD 处理器。
运行以下 grep 命令以验证您的处理器是否支持硬件虚拟化:

grep -Eoc '(vmx|svm)' /proc/cpuinfo
如果 CPU 支持硬件虚拟化,该命令将输出一个大于零的数字,即 CPU 内核数。否则,如果输出为 0,则表示 CPU 不支持硬件虚拟化。
运行以下命令安装 KVM 和其他虚拟化管理包:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager
  • qemu-kvm - 为 KVM 管理程序提供硬件仿真的软件。
  • libvirt-daemon-system - 将 libvirt 守护程序作为系统服务运行的配置文件。
  • libvirt-clients - 用于管理虚拟化平台的软件。
  • bridge-utils - 一组用于配置以太网桥的命令行工具。
  • virtinst - 一组用于创建虚拟机的命令行工具。
  • virt-manager - 一个易于使用的 GUI 界面和支持命令行实用程序,用于通过 libvirt 管理虚拟机。

  • 安装软件包后,libvirt 守护程序将自动启动。您可以通过键入以下内容进行验证:
    sudo systemctl is-active libvirtd
    
    输出:事件
    为了能够创建和管理虚拟机,您需要将您的用户添加到“libvirt”和“kvm”组。为此,请输入:
    sudo usermod -aG libvirt $USER
    sudo usermod -aG kvm $USER
    

    关于path - 错误 : Couldn't find a working QEMU executable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56507764/

    相关文章:

    javascript - 获取当前正在执行的 Javascript 的 URL

    c# - 如何在 Path.Combine() 中使用环境变量?

    process - 从 xv6 中的进程关闭 qemu

    c - 为什么这个程序分配了8页,但只能容纳2048个8字节的节点?

    c - 将结构传递给 xv6 系统调用

    c - 如何理解 xv6 Bootstrap 代码中的以下代码?

    iphone - 从核心数据调用tableview中的音频

    linux - $PATH 设置在哪里?具体我的 mac 端口路径设置在哪里?

    vmware - 如何从 kvm/qemu 导出 ovf/ova 并导入到 ESXi

    macos - 如何在qemu中明确解决 "Specify the ' raw'格式以消除限制。”