vagrant+virtualbox使用vagrant up出错

版权声明:让我们一起享受这神奇的0和1吧 https://blog.csdn.net/eebaicai/article/details/82148901
incompatible character encodings: GBK and UTF-8 (Encoding::CompatibilityError)

或

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

解决方法:
检测你的用户名是不是中文,如果是中文

因为vagrant up命令会尝试访问%userprofile%\.vagrant.d文件夹,但是你的%userprofile%的是gbk等编码命名。
设置VAGRANT_HOME可以指向vagrant的
ruby脚本可识别的路径.也可以说gem不能是识别中文路径

设置环境变量VAGRANT_HOME为其他路径,且不包含中文 如`d:\.vagrant.d`

然后还有打开virtualbox修改 默认虚拟电脑位置VirtualBox VMs的路径,
不能包含中文,如`d:\VirtualBox VMs`

猜你喜欢

转载自blog.csdn.net/eebaicai/article/details/82148901