首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PHP版本设置为7.0,而不是在LaravelHomested-7中>7.1

PHP版本设置为7.0,而不是在LaravelHomested-7中>7.1
EN

Stack Overflow用户
提问于 2018-03-02 17:07:00
回答 2查看 2.9K关注 0票数 1

自从升级到Laravel5.6之后,我的网站就不再使用家庭网站了。我想,这是PHP版本的问题。与Laravel文件中的描述不同,我的服务器运行的不是PHP7.2,而是phpversion(),如下所示:

代码语言:javascript
复制
The current PHP version is 7.0.27-1+ubuntu16.04.1+deb.sury.org+1

将php选择器添加到我的Homestead.yaml文件中没有任何效果。

代码语言:javascript
复制
sites:
  - map: homestead.app
    to: /home/vagrant/Code/Laravel/public
    php: "7.2"

我更新了整个环境,包括Virtual,Vagrant等,laravel/ whole都安装在5.1.0版本中。如何将系统升级到PHP7.2?

我尝试了“流浪破坏”&&迷航器的输出如下:

代码语言:javascript
复制
$ vagrant destroy && vagrant up
    homestead-7: Are you sure you want to destroy the 'homestead-7' VM? [y/N] 
==> homestead-7: Forcing shutdown of VM...
==> homestead-7: Destroying VM and associated drives...
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
    homestead-7: Warning: Connection reset. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
(...)
    homestead-7: Vagrant insecure key detected. Vagrant will automatically replace
    homestead-7: this with a newly generated keypair for better security.
    homestead-7:
    homestead-7: Inserting generated public key within guest...
    homestead-7: Removing insecure key from the guest if it's present...
    homestead-7: Key inserted! Disconnecting and reconnecting using new SSH key...
==> homestead-7: Machine booted and ready!

Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.18
VBoxService inside the vm claims: 5.2.4
Going on, assuming VBoxService is correct...
[homestead-7] GuestAdditions versions on your host (5.2.8) and guest (5.2.4) do not match.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.18
VBoxService inside the vm claims: 5.2.4
Going on, assuming VBoxService is correct...
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version (2.2.0.3-2ubuntu11.5).
linux-headers-4.4.0-112-generic is already the newest version (4.4.0-112.135).
linux-headers-4.4.0-112-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso
into the box /tmp/VBoxGuestAdditions.iso

我不知道我的问题是否与GuestAdditions问题有关。然而,流浪汉:有关于安装的GuestAdditions版本的不同报告的解决方案没有帮助。

谢谢你的帮助!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-03-04 22:37:29

这个问题是一个过时的宅基地版本。克隆存储库并重新启动流浪者解决了问题。

代码语言:javascript
复制
git clone https://github.com/laravel/homestead.git ~/Homestead

谢谢你的帮忙!

票数 0
EN

Stack Overflow用户

发布于 2018-03-02 22:59:46

vagrant destroy && vagrant up,如果它仍然没有使用7.2,发布完整的输出,这样我们就可以看到可能出了什么问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49073998

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档