msa*_*ord 6 windows-7 cygwin ruby rubygems vagrant
我正在尝试从 cygwin 64 中在 Windows 7 中安装vagrant-vbguest插件。
$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
执行建议的步骤会导致:
$ gem install json -v '1.8.1'
Building native extensions. This could take a while...
Successfully installed json-1.8.1
1 gem installed
Installing ri documentation for json-1.8.1...
Installing RDoc documentation for json-1.8.1...
Run Code Online (Sandbox Code Playgroud)
运行第一个命令然后以同样的方式失败。
小智 7
如果您将 Vagrant 安装在包含空格的文件夹中,则会发生这种情况。例如,C:\Program Files\HashiCorp\Vagrant
而不是默认的C:\HashiCorp\Vagrant
.
有两种解决方案可供您使用:
Program Files
变成PROGRA~1
和Program Files (x86)
变成PROGRA~2
(在大多数情况下,您应该通过输入这些路径并验证两个短名称映射到我指定的相同文件夹来自己验证)。要修改环境变量,请转到控制面板、系统、高级系统设置,单击高级选项卡,然后单击窗口底部的环境变量按钮。在 System variables 框架中,选择 Path 变量,然后单击 Edit。从那里,更改 Vagrant bin 的路径以使用短名称代替带空格的文件夹。就我而言,由于我在Program Files (x86)
目录中安装了 Vagrant ,因此我的 Path 变量如下所示:
[semi-colon delimited list of other paths];C:\PROGRA~2\HashiCorp\Vagrant\bin
Run Code Online (Sandbox Code Playgroud)
完成此操作后,打开一个新的命令提示符并再次尝试安装插件。
归档时间: |
|
查看次数: |
7002 次 |
最近记录: |