dongyan1899
2017-11-02 08:57
采纳率: 100%
浏览 1.5k
已采纳

Laravel安装错误:缺少Php扩展[重复]

这个问题已经在这里有了答案:

当我尝试安装laravel时,在下面返回了我错误

composer global require "laravel/installer"

错误:

Problem 1
    - laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.1/cli/php.ini
    - /etc/php/7.1/cli/conf.d/10-opcache.ini
    - /etc/php/7.1/cli/conf.d/10-pdo.ini
    - /etc/php/7.1/cli/conf.d/20-calendar.ini
    - /etc/php/7.1/cli/conf.d/20-ctype.ini
    - /etc/php/7.1/cli/conf.d/20-exif.ini
    - /etc/php/7.1/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.1/cli/conf.d/20-ftp.ini
    - /etc/php/7.1/cli/conf.d/20-gettext.ini
    - /etc/php/7.1/cli/conf.d/20-iconv.ini
    - /etc/php/7.1/cli/conf.d/20-json.ini
    - /etc/php/7.1/cli/conf.d/20-mbstring.ini
    - /etc/php/7.1/cli/conf.d/20-phar.ini
    - /etc/php/7.1/cli/conf.d/20-php-remctl.ini
    - /etc/php/7.1/cli/conf.d/20-posix.ini
    - /etc/php/7.1/cli/conf.d/20-readline.ini
    - /etc/php/7.1/cli/conf.d/20-shmop.ini
    - /etc/php/7.1/cli/conf.d/20-sockets.ini
    - /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.1/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.1/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.1/cli/conf.d/20-tokenizer.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

I'm using ubuntu 17.10, How can fix that error ? I tried to install that php packets but still same..

</div>

图片转代码服务由CSDN问答提供 功能建议

此问题已经存在 这里有一个答案:

  • 安装PHP Zip扩展 6 answers \ r

    当我尝试安装laravel时,它会在下面返回错误

    composer global require“laravel / installer”

    错误:

     问题1 
      -  laravel  / installer v1.4.1需要ext-zip *  - &gt; 系统中缺少所请求的PHP扩展zip。
      -  laravel / installer v1.4.0需要ext-zip *  - &gt; 系统中缺少所请求的PHP扩展zip。
      -  laravel / installer的安装请求^ 1.4  - &gt;  laravel / installer [v1.4.0,v1.4.1]可以满足。
     
    要启用扩展,请验证它们是否已在.ini文件中启用:
      -  /etc/php/7.1/cli/php.ini \  n  -  /etc/php/7.1/cli/conf.d/10-opcache.ini
      -  /etc/php/7.1/cli/conf.d/10-pdo.ini
      -  /etc/php/7.1  /cli/conf.d/20-calendar.ini
      -  /etc/php/7.1/cli/conf.d/20-ctype.ini
      -  /etc/php/7.1/cli/conf.d/20  -exif.ini 
      -  /etc/php/7.1/cli/conf.d/20-fileinfo.ini
      -  /etc/php/7.1/cli/conf.d/20-ftp.ini
      -  /  etc / php / 7.1 / cli / conf.d / 20-gettext.ini 
      -  /etc/php/7.1/cli/conf.d/20-iconv.ini
      -  /etc/php/7.1/cli/  conf.d / 20-json.ini 
      -  /etc/php/7.1/cli/conf.d/20-mbstring.ini
      -  /etc/php/7.1/cli/conf.d/20-phar。  ini 
      -  /etc/php/7.1/cli/conf.d/20-php-remctl.ini
      -  /etc/php/7.1/cli/conf.d/20-posix.ini
      -  / etc  /php/7.1/cli/conf.d/20-readline.ini
      -  /etc/php/7.1/cli/conf.d/20-shmop.ini
      -  /etc/php/7.1/cli/conf  .d / 20-sockets.ini 
      -  /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
      -  /etc/php/7.1/cli/conf.d/2  0-sysvsem.ini 
      -  /etc/php/7.1/cli/conf.d/20-sysvshm.ini
      -  /etc/php/7.1/cli/conf.d/20-tokenizer.ini
    你 也可以在终端内运行`php --ini`来查看PHP在CLI模式下使用的文件。
     
    安装失败,将./composer.json恢复为原始内容。
        
     
     

    我正在使用ubuntu 17.10,如何修复该错误? 我试图安装那些php数据包但仍然相同..

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • douchi0638 2017-11-02 09:01
    已采纳
    Problem 1
        - laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
        - laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
        - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].
    

    Composer is telling you that a missing extension is blocking the process.

    Try to execute sudo apt-get install php7.0-zip (or 7.1)

    打赏 评论
  • douhan4093 2017-11-02 09:00

    Try this:

    sudo apt-get install php-zip
    
    打赏 评论

相关推荐 更多相似问题