不能运行 vagrant up
Can't run vagrant up
好的,这很简单:
我在 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"
所以当我尝试 运行 vagrant up 开始使用 vagrant 时:
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'
没问题。看来 vagrant 附带的 ruby 无法正确处理 windows 文件系统。
在我的案例中,它只是在崩溃的 ruby 脚本中注释掉(并保存)有问题的行。
在我的例子中,unlink 命令只是想删除一个临时文件作为清理过程的一部分。如果您愿意,可以手动删除相应的临时文件。但通常你最好先检查哪些文件将被取消链接以及为什么 ;)
这是 Vagrant VBoxGuessAdditions error
的副本
但无论如何这是一个好的开始:
试试 Vagrant 1.7.X。我对 1.8.X.
有同样的问题
干杯,
好的,这很简单:
我在 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"
所以当我尝试 运行 vagrant up 开始使用 vagrant 时:
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'
没问题。看来 vagrant 附带的 ruby 无法正确处理 windows 文件系统。
在我的案例中,它只是在崩溃的 ruby 脚本中注释掉(并保存)有问题的行。
在我的例子中,unlink 命令只是想删除一个临时文件作为清理过程的一部分。如果您愿意,可以手动删除相应的临时文件。但通常你最好先检查哪些文件将被取消链接以及为什么 ;)
这是 Vagrant VBoxGuessAdditions error
的副本但无论如何这是一个好的开始:
试试 Vagrant 1.7.X。我对 1.8.X.
有同样的问题干杯,