在 macOS 下安装过程中报错

由于是第一次使用 mac 安装 laravel,真没头绪了。望大佬可以给我解答一下。

执行 composer global require laravel/installer 后:
以下是报错内容:
在 macOS 下 执行 composer global require laravel/installer 报错

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

  Problem 1
    - laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1].


Installation failed, reverting ./composer.json to its original content.
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
最佳答案

安装一下 PHP 的 zip 扩展,或者回避这个问题,使用推荐的 composer 直接安装,不用 Laravel 安装器

5年前 评论
讨论数量: 3

安装一下 PHP 的 zip 扩展,或者回避这个问题,使用推荐的 composer 直接安装,不用 Laravel 安装器

5年前 评论

同样的问题,不知博主解决了没有 centos7, php7.3.16

4年前 评论
composer create-project --prefer-dist laravel/laravel laravel
Creating a "laravel/laravel" project at "./laravel"
Installing laravel/laravel (v7.3.0)
  - Installing laravel/laravel (v7.3.0): Loading from cache
Created project in /root/laravel
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
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
    - phpunit/phpunit 8.5.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - Installation request for phpunit/phpunit ^8.5 -> satisfiable by phpunit/phpunit[8.5.0, 8.5.1, 8.5.2, 8.5.x-dev].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/opt/remi/php73/php.ini
    - /etc/opt/remi/php73/php.d/10-opcache.ini
    - /etc/opt/remi/php73/php.d/20-bcmath.ini
    - /etc/opt/remi/php73/php.d/20-bz2.ini
    - /etc/opt/remi/php73/php.d/20-calendar.ini
    - /etc/opt/remi/php73/php.d/20-ctype.ini
    - /etc/opt/remi/php73/php.d/20-curl.ini
    - /etc/opt/remi/php73/php.d/20-exif.ini
    - /etc/opt/remi/php73/php.d/20-fileinfo.ini
    - /etc/opt/remi/php73/php.d/20-ftp.ini
    - /etc/opt/remi/php73/php.d/20-gd.ini
    - /etc/opt/remi/php73/php.d/20-gettext.ini
    - /etc/opt/remi/php73/php.d/20-iconv.ini
    - /etc/opt/remi/php73/php.d/20-json.ini
    - /etc/opt/remi/php73/php.d/20-mbstring.ini
    - /etc/opt/remi/php73/php.d/20-mysqlnd.ini
    - /etc/opt/remi/php73/php.d/20-pdo.ini
    - /etc/opt/remi/php73/php.d/20-phar.ini
    - /etc/opt/remi/php73/php.d/20-recode.ini
    - /etc/opt/remi/php73/php.d/20-snmp.ini
    - /etc/opt/remi/php73/php.d/20-soap.ini
    - /etc/opt/remi/php73/php.d/20-sockets.ini
    - /etc/opt/remi/php73/php.d/20-sqlite3.ini
    - /etc/opt/remi/php73/php.d/20-tokenizer.ini
    - /etc/opt/remi/php73/php.d/30-mcrypt.ini
    - /etc/opt/remi/php73/php.d/30-mysqli.ini
    - /etc/opt/remi/php73/php.d/30-pdo_mysql.ini
    - /etc/opt/remi/php73/php.d/30-pdo_sqlite.ini
    - /etc/opt/remi/php73/php.d/40-crypto.ini
    - /etc/opt/remi/php73/php.d/40-geoip.ini
    - /etc/opt/remi/php73/php.d/40-swoole.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
4年前 评论
backspace 3年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!