debian - 如何在 Windows 终端的 debian wsl 中运行 vagrant
问题描述
我想从 Windows 终端在 debian wsl 中运行 vagrant 我已经安装了 vagrant
/mnt/c/HS_DEV/Homestead$ vagrant --version
我明白了
流浪者 2.2.6
所以我试图让 vagrant 起来
我得到了
The executable 'cmd.exe' Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.
所以我试图在 Windows 终端的配置中使用 debian.exe 而不是默认的 cmd.exe。但仍然无法正常工作,是否有人知道如何做到这一点或问题出在哪里。如果您对我的配置有更多疑问,我会回答。
如果我使用 powershell 或 cmd.exe,我也无法工作,而且我也可以使用 gitbash,但我想在我的 debian wsl 中进行
解决方案
首先确定 vagrant.exe 文件所在的位置,即:
/mnt/c/Hashicorp/Vagrant/bin
然后运行:
export PATH="$PATH:/mnt/c/Hashicorp/Vagrant/bin"
推荐阅读
- python - 从 python 脚本内部运行 docker 在启动时不起作用
- android - 如何使 avd x86 与 Windows 管理程序平台一起工作?
- github - github 支持哪些扩展,用于语法高亮和代码/语言识别?
- java - 如何在堆栈中使用 ToString
- java - 火花流停止
- r - Plotly 3D 地球仪未在 Shiny 应用程序中渲染
- if-statement - 石头、纸、剪刀的有效输入检查
- flutter - 例外:不支持的操作:RawSocket 构造函数(Dart with mysql1: ^2.2.1)
- c - 将0和1字符的字符串转换为十六进制字符串
- sql - 外键约束失败 - 即使我尝试手动添加数据