【问题标题】:Download Laravel Installer error下载 Laravel 安装程序错误
【发布时间】:2018-07-02 10:01:00
【问题描述】:

使用此命令时出现此错误。我该如何解决?

php composer.phar global require "laravel/installer"

控制台输出:

Changed current directory to /home/jiten-p/.config/composer
Using version ^1.5 for laravel/installer
./composer.json has been created

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
    - Installation request for laravel/installer ^1.5 -> satisfiable by laravel/installer[v1.5.0].


    - laravel/installer v1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.


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


    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/15-xml.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-dom.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mbstring.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-simplexml.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-wddx.ini
    - /etc/php/7.0/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.0/cli/conf.d/20-xsl.ini


  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.


Installation failed, deleting ./composer.json.***

【问题讨论】:

标签: php laravel composer-php php-ini


【解决方案1】:

根据composer错误信息需要安装php模块ext-zip

运行sudo apt-get install php7.0-zip

它会将php模块ext-zip添加到你的linux包中。

【讨论】:

  • 谢谢你这么多@J。 Litvak 我用这个命令它的作品非常好
  • 请将我的回答标记为有用。点击向上箭头@JitenPatel
  • 我会给你+1,但请在你的灵魂中添加更多描述,否则你的答案将落在低质量的帖子中,它会被删除
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-04-01
  • 2015-01-14
  • 2010-09-17
  • 1970-01-01
  • 2017-01-10
  • 1970-01-01
  • 2011-11-17
相关资源
最近更新 更多