代码之家  ›  专栏  ›  技术社区  ›  David Machara

在VPS上托管Laravel 5.6?

  •  0
  • David Machara  · 技术社区  · 7 年前

    嗨,伙计们第一次尝试在vps上托管Laravel 5.6应用程序,但我似乎无法正确处理。…正在使用lemp。我遵循了一些使用php 7.0的指南,但我的项目需要php7.1“我想我用以下行解决了错误。”

    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].
    

    这是我第一次,欢迎您提供有用的信息:)

    1 回复  |  直到 7 年前
        1
  •  1
  •   Daniel W    7 年前

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

    sudo apt-get install php-xml
    

    安装软件包后,再次运行composer安装程序。

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

    编辑: 如果它没有安装正确版本的软件包,您可以使用@dharma saputra's comment中的命令:

    sudo apt-get install php7.1-xml