Vagrant up 出错 「invalid byte sequence in GBK」

box 的版本是 0.5.0
vagrant up 出错 provisioner.rb:164:ingsub': invalid byte sequence in GBK (ArgumentError)`

==> default: Destroying VM and associated drives...
D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:164:in                                 `gsub': invalid byte sequence in GBK (ArgumentError)
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provision                                er.rb:164:in `quote_and_escape'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provision                                er.rb:17:in `block in provision'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provision                                er.rb:17:in `map'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provision                                er.rb:17:in `provision'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision                                .rb:133:in `run_provisioner'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:473:in `h                                ook'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision                                .rb:121:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision                                .rb:121:in `block in call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision                                .rb:103:in `each'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision                                .rb:103:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                clear_forwarded_ports.rb:15:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                set_name.rb:50:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                clean_machine_folder.rb:17:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                check_accessible.rb:18:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:5                                3:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:5                                3:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:5                                3:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/box_check                                _outdated.rb:78:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/config_va                                lidate.rb:25:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                check_virtualbox.rb:17:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                match_mac_address.rb:19:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                discard_state.rb:15:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                import.rb:74:in `import'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                import.rb:13:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                prepare_clone_snapshot.rb:17:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/prepare_c                                lone.rb:15:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                customize.rb:40:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                check_accessible.rb:18:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:5                                3:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/config_va                                lidate.rb:25:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/handle_bo                                x.rb:56:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `                                block in finalize_action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:5                                3:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/                                check_virtualbox.rb:17:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `                                call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in                                 `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                block in run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy                                '
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `                                run'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:225:in `actio                                n_raw'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:200:in `block                                 in action'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:561:in `l                                ock'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `call'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `actio                                n'
        from D:/Program Files/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/batch_action.rb:82:in `b                                lock (2 levels) in run'

有没有朋友遇到,这个问题怎么解决。

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
讨论数量: 4
Summer

把你编辑过的 homestead 或者任何相关文件重新保持为 utf-8 试试。

2年前
heibai_2018

@Summer 我也碰到了这个问题,重新装也不好使?还有没有其他的思路?

8个月前

@Summer 我也遇到了这样的问题 有别的解决方案吗?

5个月前

@Summer
出错了:
==> homestead-7: Running provisioner: file...
==> homestead-7: Running provisioner: shell...
homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
==> homestead-7: Forcing shutdown of VM...
==> homestead-7: Destroying VM and associated drives...
I:/VagrantAnzhuang/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/shell/provisioner.rb:226:in gsub': invalid byte sequence in GBK (ArgumentError) from I:/VagrantAnzhuang/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/shell/provisioner.rb:226:inquote_and_escape'
from I:/VagrantAnzhuang/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/shell/provisioner.rb:17:in block in provision' from I:/VagrantAnzhuang/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/shell/provisioner.rb:17:inmap'
from I:/VagrantAnzhuang/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/shell/provisioner.rb:17:in `provision'

5个月前

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!

社区文档:

将托管在 packagist.org 和 github.com 的扩展包使用国内 CDN 加速
GitHub Laravel 扩展包 TOP 250
速查表方便快速查询框架功能,支持手机访问,支持中英文版本
Laravel 中文文档,由社区用户翻译和维护,将会保持一直更新
此文档的目的,就是为了提高技术团队的凝聚力、一致性和生产效率。
开发环境的部署,开发者工具的选择,适用于 Mac 和 Windows。
浓缩过后的精华
Laravel Nova 后台管理面板文档的中文翻译
Lumen 中文文档,由社区用户翻译和维护,将会保持一直更新
Laravel 下知名扩展包 Dingo API 的中文文档,Laravel API 开发必知必会