我一直在四处寻找安静很长时间只是为了在窗户上安装laravel宅基但是仍然没有运气来解决它。我正在使用VirtualBox 5.1.14和vagrant 1.9.2以及Guest 4.2.0,它经常说我的主机和来宾中的GuestAddition不匹配。我有点累了搞清楚这就是我在这里问的原因,因为我知道你们中有些人已经弄清楚了。请帮我。这是我的设置。我正在关注laravel宅基地的Per Project安装文档。非常感谢你的帮助。
Homestead.yaml
ip: 192.168.10.10
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
-
map: 'C:\xampp\htdocs'
to: /home/vagrant/Code/htdocs
sites:
-
map: homestead.app
to: /home/vagrant/Code/htdocs/Laravel/public
databases:
- homestead
name: htdocs
hostname: htdocs
文件夹结构
在我的C:\xampp\htdocs
中,我有.vagrant
个文件夹,Homestead.yaml
和Vagrantfile
。我在里面有Laravel
项目文件夹。
我在主持人档案中有这一行
192.168.10.10 homestead.app
终端日志:
# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: xampp_default_1489894399165_80912
==> 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:
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!
[default] GuestAdditions versions on your host (5.1.14) and guest (4.2.0) do not
match.
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
fakeroot linux-headers-3.2.0-23 make patch
Suggested packages:
make-doc diffutils-doc
The following NEW packages will be installed:
dkms fakeroot linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic make
patch
0 upgraded, 6 newly installed, 0 to remove and 66 not upgraded.
Need to get 12.7 MB of archives.
After this operation, 68.5 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main make amd64 3.81-8.1ubunt
u1 [118 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main patch amd64 2.6.1-3 [80.
2 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main dkms all 2.2.0.3-1ubuntu
3 [73.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main fakeroot amd64 1.18.2-1
[87.2 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23 a
ll 3.2.0-23.36 [11.4 MB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23-g
eneric amd64 3.2.0-23.36 [947 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 12.7 MB in 1min 5s (193 kB/s)
Selecting previously unselected package make.
(Reading database ... 51095 files and directories currently installed.)
Unpacking make (from .../make_3.81-8.1ubuntu1_amd64.deb) ...
Selecting previously unselected package patch.
Unpacking patch (from .../patch_2.6.1-3_amd64.deb) ...
Selecting previously unselected package dkms.
Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3_all.deb) ...
Selecting previously unselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.18.2-1_amd64.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23.
Unpacking linux-headers-3.2.0-23 (from .../linux-headers-3.2.0-23_3.2.0-23.36_al
l.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23-generic.
Unpacking linux-headers-3.2.0-23-generic (from .../linux-headers-3.2.0-23-generi
c_3.2.0-23.36_amd64.deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8.1ubuntu1) ...
Setting up patch (2.6.1-3) ...
Setting up dkms (2.2.0.3-1ubuntu3) ...
Setting up fakeroot (1.18.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (
fakeroot) in auto mode.
Setting up linux-headers-3.2.0-23 (3.2.0-23.36) ...
Setting up linux-headers-3.2.0-23-generic (3.2.0-23.36) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-23-generic /boot/v
mlinuz-3.2.0-23-generic
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the
box /tmp/VBoxGuestAdditions.iso
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 5.1.14 - guest version is 4.2.0
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.14 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 4.2.0 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: You should restart your guest to make sure the new modules are actua
lly used.
vboxadd.sh: Starting the VirtualBox Guest Additions.
Could not find the X.Org or XFree86 Window System, skipping.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 4.2.0
VBoxService inside the vm claims: 5.1.14
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 4.2.0
VBoxService inside the vm claims: 5.1.14
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 4.2.0
VBoxService inside the vm claims: 5.1.14
Going on, assuming VBoxService is correct...
Restarting VM to apply changes...
==> default: Attempting graceful shutdown of VM...
==> 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: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => C:/xampp