简体   繁体   English

在 windows 上使用 vagrant 插件安装命令时超时

[英]Timed out when using vagrant plugin install command on windows

I am trying to install some vagrant plugins so I can create my local VM.我正在尝试安装一些 vagrant 插件,以便创建本地 VM。 Here is what I got after executing vagrant plugin install vagrant-vbguest command.这是执行vagrant plugin install vagrant-vbguest命令后得到的结果。

输出截图

I have also tried vagrant plugin install vagrant-vbguest --plugin-clean-sources --plugin-source https://rubygems.org command but I'm still getting the same error.我也试过vagrant plugin install vagrant-vbguest --plugin-clean-sources --plugin-source https://rubygems.org命令,但我仍然遇到同样的错误。

在此处输入图像描述

I also tried to install the plugin by specifying the path to the downloaded GEM file: https://www.vagrantup.com/docs/plugins/usage.html我还尝试通过指定下载的 GEM 文件的路径来安装插件: https://www.vagrantup.com/docs/plugins/usage.html

I download the GEM file to /home/downloads/vagrant-vbguest.gem and then command vagrant plugin install /home/downloads/vagrant-vbguest.gem and still getting the same error.我将 GEM 文件下载到/home/downloads/vagrant-vbguest.gem ,然后命令vagrant plugin install /home/downloads/vagrant-vbguest.gem并仍然收到相同的错误。

What do you suggest as a solution guys?你有什么建议作为解决方案?

Thank you,谢谢,

first get the ipv4 address of rubygems.org with首先获取 rubygems.org 的 ipv4 地址

ping rubygems.org

then try this:然后试试这个:

vagrant plugin install <gem_plugin> --plugin-clean-sources --plugin-source https://<ip_address>

I figured out the problem.我解决了这个问题。 There was some restrictions in my network.我的网络有一些限制。 I just switched to another network and it worked fine.我刚刚切换到另一个网络,它工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM