编程语言
首页 > 编程语言> > Laravel在Plesk背后,遇到PHP版本困难

Laravel在Plesk背后,遇到PHP版本困难

作者:互联网

我目前正在尝试让我的Laravel应用程序在Plesk Onyx后面运行.现在,当尝试运行composer安装时,出现以下错误消息:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctrine/inflector[v1.3.0].
    - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
  Problem 2
    - Installation request for symfony/css-selector v4.0.6 -> satisfiable by symfony/css-selector[v4.0.6].
    - symfony/css-selector v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
  Problem 3
    - Installation request for symfony/event-dispatcher v4.0.6 -> satisfiable by symfony/event-dispatcher[v4.0.6].
    - symfony/event-dispatcher v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
  Problem 4
    - Installation request for symfony/translation v4.0.6 -> satisfiable by symfony/translation[v4.0.6].
    - symfony/translation v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
  Problem 5
    - Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
  Problem 6
    - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
    - laravel/framework v5.5.39 requires doctrine/inflector ~1.1 -> satisfiable by doctrine/inflector[v1.3.0].
    - Installation request for laravel/framework v5.5.39 -> satisfiable by laravel/framework[v5.5.39].

好.我肯定会理解错误.我运行Debian 9,“ PHP by OS Vendor”是7.0.27.但是,我知道服务器上安装了PHP 7.1(甚至7.2),因为Plesk让我选择(对于域和虚拟主机)这些版本.我现在的问题是:如何告诉作曲家使用服务器上安装的某个PHP版本,在Debian和Plesk下如何工作?

编辑:我没有全局安装Composer.只需https://getcomposer.org/download/“命令行安装”.

解决方法:

这是如何做:

查找Plesk使用的PHP路径.就我而言,这是/ opt / plesk / php /.在此文件夹中,有根据PHP版本安装的文件夹:7.0、7.1、7.2.因此php composer.phar安装成为/opt/plesk/php/7.2/bin/php composer.phar安装. &有用.

标签:plesk,laravel,composer-php,php,debian-stretch
来源: https://codeday.me/bug/20191109/2011308.html