在 VPS 主持 laravel 5.6?

Hosting laravel 5.6 on VPS?

大家好,我是第一次尝试在 VPS 上托管一个 laravel 5.6 应用程序,但我似乎做不好。我正在使用 LEMP.i 遵循一些指南正在使用 php 7.0 但我的项目需要 php 7.1 "i think i managed to resolve the error using the following line"

sudo apt-get install php7.1-cli php7.1-fpm php7.1-mbstring php7.1-mysql 
php7.1-mcrypt php7.1-curl

现在出现以下错误

Problem 1
- Installation request for phpoffice/phpexcel 1.8.1 -> satisfiable by 
phpoffice/phpexcel[1.8.1].
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension 
xml is missing from your system.
Problem 2
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension 
xml is missing from your system.
- maatwebsite/excel 2.1.28 requires phpoffice/phpexcel ^1.8.1 -> satisfiable 
by phpoffice/phpexcel[1.8.1].
- Installation request for maatwebsite/excel 2.1.28 -> satisfiable by 
maatwebsite/excel[2.1.28].

这是我第一次,所以非常欢迎任何有用的信息:)

您需要安装 php-xml 软件包。您可以使用以下命令执行此操作:

sudo apt-get install php-xml

安装包后运行作曲家再次安装。

您可以在此处阅读有关此问题的更多信息:https://laracasts.com/discuss/channels/servers/how-do-i-install-the-dom-extension-for-php7

编辑: 如果它没有安装正确版本的包,您可以使用@Dharma Saputra 评论中的命令:

sudo apt-get install php7.1-xml