我正在尝试在没有互联网连接的情况下在 Windows 7 上安装 vagrant-hostmanager 插件。
我已经从 rubygems.org 下载了 gem 文件并复制到这台机器的 D:\distr\Vagrant。
然后我移动到这个文件夹并使用 Ruby 在命令提示符中运行(具有管理员权限):
vagrant plugin install vagrant-hostmanager --entry-point vagrant-hostmanager-1.8.6.gem
并得到以下错误:
Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:
Errno::ECONNREFUSED: No connection could be made because the target machine ac
tively refused it. - connect(2) for "api.rubygems.org" port 443 (https://api.rub
ygems.org/specs.4.8.gz)
Source: https://rubygems.org/
我也将 specs.4.8.gz 放到了他的文件夹中,但没有帮助。我还将 specs.4.8 放入 SPEC CACHE DIRECTORY 并将 gem 文件放入 gem 环境中定义的 GEM PATHS 中。它也没有帮助。
版本:
Windows 企业服务包 1(32 位)
vagrant_1.9.5.msi
VirtualBox-5.1.22-115126-Win.exe
红宝石 2.5.2
rubyinstaller 2.3.3 (2016-11-21 补丁级别 222) [i386-mingw32]
我还尝试了其他版本的 vagrant 和 gem:vagrant_1.8.4.msi 和 vagrant-hostmanager-1.8.5.gem。结果是一样的。
是否可以离线安装 vagrant 插件?
谢谢!