gpt4 book ai didi

vagrant shell脚本失败,出现无法解释的错误 ```只读文件系统(运行时错误)```

转载 作者:行者123 更新时间:2023-12-04 11:39:33 25 4
gpt4 key购买 nike

我在 vagrant 中有一个小配置 shell 配置脚本(安装木偶失败的东西..)
剧本:

#!/bin/bash
echo 'provisioning librarian'
gem install librarian-puppet
librarian-puppet install

sh prescript.sh 运行良好
但从 vagrant 配置失败:
D:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.1.0/lib/net/scp.rb:385:in `awa
it_response_state': ☺scp: /tmp/vagrant-shell: Read-only file system (RuntimeErro
r)
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.1.0/lib/net/scp.r
b:356:in `block (3 levels) in start_command'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/channel.rb:311:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/channel.rb:311:in `process'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:217:in `block in preprocess'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:217:in `each'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:217:in `preprocess'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:200:in `process'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:164:in `block in loop'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:164:in `loop'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/session.rb:164:in `loop'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/c
onnection/channel.rb:269:in `wait'
from D:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.1.0/lib/net/scp.r
b:279:in `upload!'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commu
nicators/ssh/communicator.rb:105:in `block in upload'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commu
nicators/ssh/communicator.rb:331:in `block in scp_connect'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commu
nicators/ssh/communicator.rb:139:in `connect'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commu
nicators/ssh/communicator.rb:329:in `scp_connect'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commu
nicators/ssh/communicator.rb:99:in `upload'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
sioners/shell/provisioner.rb:20:in `block (2 levels) in provision'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
sioners/shell/provisioner.rb:14:in `tap'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
sioners/shell/provisioner.rb:14:in `block in provision'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
sioners/shell/provisioner.rb:78:in `with_script_file'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
sioners/shell/provisioner.rb:12:in `provision'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/provision.rb:65:in `run_provisioner'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/provision.rb:53:in `block in call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/provision.rb:49:in `each'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/provision.rb:49:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/warden.rb:34:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
ders/virtualbox/action/check_accessible.rb:18:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/warden.rb:34:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/runner.rb:61:in `block in run'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/u
til/busy.rb:19:in `busy'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/runner.rb:61:in `run'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/call.rb:51:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/warden.rb:34:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/runner.rb:61:in `block in run'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/u
til/busy.rb:19:in `busy'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/runner.rb:61:in `run'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/call.rb:51:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/warden.rb:34:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builtin/config_validate.rb:25:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/warden.rb:34:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provi
ders/virtualbox/action/check_virtualbox.rb:17:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/warden.rb:34:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/builder.rb:116:in `call'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/runner.rb:61:in `block in run'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/u
til/busy.rb:19:in `busy'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/a
ction/runner.rb:61:in `run'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/m
achine.rb:147:in `action'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/comma
nds/provision/command.rb:26:in `block in execute'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/p
lugin/v2/command.rb:182:in `block in with_target_vms'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/p
lugin/v2/command.rb:180:in `each'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/p
lugin/v2/command.rb:180:in `with_target_vms'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/comma
nds/provision/command.rb:25:in `execute'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/c
li.rb:46:in `execute'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/e
nvironment.rb:467:in `cli'
from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:8
4:in `<top (required)>'
from D:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:
23:in `load'
from D:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:
23:in `<main>'

以下建议 here我已经更改(使用 sublimetext2)以 unix 结尾的 windows 行。但仍然失败
有任何想法吗

最佳答案

我刚刚在 vagrant up 时遇到了这个错误。虚拟机。就我而言,问题似乎是虚拟机的先前副本在后台运行。一些历史:

  • 同一项目的虚拟机之前已经崩溃(几小时前),我不得不关闭终端窗口(macOS)并重新启动虚拟机(使用 vagrant halt + vagrant up )。
  • 这似乎解决了问题,我正常进行并忘记了它。
  • 后来,在我对 Vagrantfile 进行了更改并想确保一切正常后,我销毁了 VM 和 vagrant up编辑了一个新的,只是遇到了这个错误。
  • 在阅读了@AlexNorth-Keys 的答案后,我想起了虚拟机之前已经崩溃的事实,所以我决定重新启动计算机,然后一切正常。我很确定崩溃的 VM 的副本一定是在后台运行的,并且它共享项目文件夹会导致问题。

  • 显然这只是一个猜测,但重新启动主机解决了这个问题。

    关于vagrant shell脚本失败,出现无法解释的错误 ```只读文件系统(运行时错误)```,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17575787/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com