好的,这很简单:
我在Windows 10上。 我刚刚下载了Vagrant v1.8.0和Virtualbox 5.0.12。
我所做的一切只是:vagrant init
所以我的VagrantFile只包含这个:
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
因此,当我尝试运行流浪汉开始使用流浪汉时:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: A newer version of the box 'ubuntu/trusty64' is available! You currently
==> default: have version '20150928.0.0'. The latest is version '20151217.0.0'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: test_default_1450894082445_28801
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
GuestAdditions versions on your host (5.0.12) and guest (4.3.10) do not match.
stdin: is not a tty
* Stopping VirtualBox Additions
...done.
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
dkms fakeroot gcc gcc-4.8 libasan0 libatomic1 libc-dev-bin libc6-dev
libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfakeroot libfontenc1
libgcc-4.8-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgomp1
libice6 libitm1 libllvm3.4 libpciaccess0 libpixman-1-0 libquadmath0 libsm6
libtsan0 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0
libxcb-glx0 libxcb-present0 libxcb-sync1 libxcomposite1 libxdamage1
libxfixes3 libxfont1 libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1
libxshmfence1 libxt6 libxxf86vm1 linux-libc-dev manpages-dev x11-common
x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common
xserver-xorg-core
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
virtualbox-guest-dkms* virtualbox-guest-utils* virtualbox-guest-x11*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 12.1 MB disk space will be freed.
(Reading database ... 61000 files and directories currently installed.)
Removing virtualbox-guest-dkms (4.3.10-dfsg-1ubuntu5) ...
-------- Uninstall Beginning --------
Module: virtualbox-guest
Version: 4.3.10
Kernel: 3.13.0-65-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxguest.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-65-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxsf.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-65-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxvideo.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-65-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
------------------------------
Deleting module version: 4.3.10
completely from the DKMS tree.
------------------------------
Done.
Removing virtualbox-guest-x11 (4.3.10-dfsg-1ubuntu5) ...
Purging configuration files for virtualbox-guest-x11 (4.3.10-dfsg-1ubuntu5) ...
Removing virtualbox-guest-utils (4.3.10-dfsg-1ubuntu5) ...
Purging configuration files for virtualbox-guest-utils (4.3.10-dfsg-1ubuntu5) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
dkms set to manually installed.
linux-headers-3.13.0-65-generic is already the newest version.
linux-headers-3.13.0-65-generic set to manually installed.
The following packages were automatically installed and are no longer required:
libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1-mesa-dri
libgl1-mesa-glx libglapi-mesa libice6 libllvm3.4 libpciaccess0 libpixman-1-0
libsm6 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0
libxcb-glx0 libxcb-present0 libxcb-sync1 libxcomposite1 libxdamage1
libxfixes3 libxfont1 libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1
libxshmfence1 libxt6 libxxf86vm1 x11-common x11-xkb-utils xfonts-base
xfonts-encodings xfonts-utils xserver-common xserver-xorg-core
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Downloading VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/5.0.12/VBoxGuestAdditions_5.0.12.iso
Copy iso file C:/Users/jules/.vagrant.d/tmp/VBoxGuestAdditions_5.0.12.iso into the box /tmp/VBoxGuestAdditions.iso
stdin: is not a tty
mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only
Installing Virtualbox Guest Additions 5.0.12 - guest version is 4.3.10
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 5.0.12. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
stdin: is not a tty
Cleaning up downloaded VirtualBox Guest Additions ISO...
==> default: Checking for guest additions in VM...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/download.rb:23:in `unlink': Permission denied @ unlink_internal - C:/Users/jules/.vagrant.d/tmp/VBoxGuestAdditions_5.0.12.iso (Errno::EACCES)
from C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/download.rb:23:in `cleanup'
from C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/hosts/base.rb:62:in `cleanup'
from C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/installers/base.rb:194:in `cleanup'
from C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/installer.rb:120:in `cleanup'
from C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/installer.rb:67:in `install'
from C:/Users/jules/.vagrant.d/gems/gems/vagrant-vbguest-0.11.0/lib/vagrant-vbguest/machine.rb:93:in `block (2 levels) in guest_additions_state'
from C:/Users/jules/.vagrant.d/gems/gems/micromachine-1.1.0/lib/micromachine.rb:25:in `call'
from C:/Users/jules/.vagrant.d/gems/gems/micromachine-1.1.0/lib/micromachine.rb:25:in `block in trigger'
from C:/Users/jules/.vagrant.d/gems/gems/micromachine-1.1.0/lib/micromachine.rb:25:in `each'
from C:/Users/jules/.vagrant.d/gems/gems/micromachine-1.1.0/lib/micromachine.rb:25:in `trigger'
答案 0 :(得分:3)
没错。看来流浪汉带来的红宝石不能正确处理Windows文件系统。
在我的案例中,它只是在崩溃的ruby脚本中注释掉(并保存)有问题的行。
在我的案例中,unlink命令无论如何只想删除临时文件作为清理过程的一部分。如果您愿意,可以手动删除相应的临时文件。但通常你最好首先检查哪个文件将被取消链接以及为什么;)
答案 1 :(得分:1)