【问题标题】:laravel vagrant/homestead fails to install. git bash errorlaravel vagrant/homestead 安装失败。 git bash 错误
【发布时间】:2021-03-23 13:24:06
【问题描述】:

enter image description here laravel homestead 无法安装 vagrant git bash 错误 git bash代码不起作用 windows 10 vagrant 安装测试

问题: C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:44:in encode!': "\xC4" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE (Encoding::UndefinedConversionError) from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:44:in to_wide_string' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:67:in create_environment_pointer' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process_builder.rb:28:in start' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/windows/process.rb:70:in launch_process' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/childprocess-4.0.0/lib/childprocess/abstract_process.rb:81:in start' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/subprocess.rb:155:in block in execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:26:in block (2 levels) in safe_chdir' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:25:in chdir' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:25:in block in safe_chdir' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:24:in synchronize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/safe_chdir.rb:24:in safe_chdir' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/subprocess.rb:154:in execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/subprocess.rb:22:in execute' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/powershell.rb:174:in version' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/powershell.rb:195:in validate_install!' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/powershell.rb:96:in execute_cmd' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/platform.rb:82:in block in windows_admin?' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/platform.rb:84:in windows_admin?' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/hyperv/provider.rb:20:in usable?' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:361:in block in default_provider' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/registry.rb:49:in block in each' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/registry.rb:48:in each' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/registry.rb:48:in each' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:347:in default_provider' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:943:in guess_provider' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:955:in find_configured_plugins' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:983:in process_configured_plugins' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:178:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/bin/vagrant:168:in new' 来自 C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/bin/vagrant:168:in `'

【问题讨论】:

    标签: laravel vagrant virtual-machine homestead


    【解决方案1】:

    你应该去“C:\HashiCorp\Vagrant\embedded\gems\2.2.14\gems\vagrant-2.2.14\bin”地址并打开“vagrant”文件。在文件的开头,您会看到“#!/usr/bin/env ruby​​” 在第一行之后粘贴以下 2 行。

    Encoding.default_external = Encoding.find('Windows-1251')
    Encoding.default_internal = Encoding.find('Windows-1251')
    

    小心,它们是“1251”,而不是“1250”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-14
      • 1970-01-01
      • 2020-02-22
      • 1970-01-01
      • 2017-10-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多