猿问

无法在Ubuntu 18中安装Laravel望远镜

我正在Laravel 5.8中创建一个新项目,我也想安装Telescope,但是当我在项目中执行命令时:


composer require laravel/telescope

输出:


./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.


  Problem 1

    - laravel/telescope 2.0.x-dev requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.0, 1.1.1, 1.1.2].

    - laravel/telescope v2.0 requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.0, 1.1.1, 1.1.2].

    - laravel/telescope v2.0.1 requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.0, 1.1.1, 1.1.2].

    - laravel/telescope v2.0.2 requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.0, 1.1.1, 1.1.2].

    - laravel/telescope v2.0.3 requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.0, 1.1.1, 1.1.2].

    - laravel/telescope v2.0.4 requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.0, 1.1.1, 1.1.2].

    - moontoast/math 1.1.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

    - moontoast/math 1.1.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

    - moontoast/math 1.1.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

    - Installation request for laravel/telescope ^2.0 -> satisfiable by laravel/telescope[2.0.x-dev, v2.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4].


  To enable extensions, verify that they are enabled in your .ini files:



如何安装缺少的依赖项?我正在使用PHP 7.2和ubuntu 18.04.2。


慕丝7291255
浏览 168回答 1
1回答

达令说

您将必须安装bcmath扩展程序。在您的情况下,可以通过运行sudo apt-get install php7.2-bcmathsudo apt-get install php7.1-bcmath 如果您有PHP 7.1然后再次运行require命令。
随时随地看视频慕课网APP
我要回答