作曲家要求phpoffice/phpspreadsheet无法正常工作 [英] Composer require phpoffice/phpspreadsheet doesn't work

查看:1745
本文介绍了作曲家要求phpoffice/phpspreadsheet无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Phpspreadsheet软件包编写脚本.我没有PHP经验.我正在尝试通过sudo composer require phpoffice/phpspreadsheet向我的脚本添加引用.但这是行不通的.我收到错误消息:安装失败,删除composer.json....如果不知道为什么它不起作用.有什么主意吗?

I want to write a Script using the package Phpspreadsheet. I am not experience in php. I am trying to add the reference to my script through sudo composer require phpoffice/phpspreadsheet. But it doesn't work. I am getting the error: In stallation failed, deleting composer.json....If have no idea why it is not working. Any idea?

详细错误:

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

Problem 1
- Installation request for phpoffice/phpspreadsheet ^1.0 -> satisfiable by phpoffice/phpspreadsheet[1.0.0].
- phpoffice/phpspreadsheet 1.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.

To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.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/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.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-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.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-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
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.

推荐答案

所以我应该安装

sudo apt install php-xml

sudo apt install php7.0-gd

sudo apt install php7.0-mbstring

sudo apt install php-zip

这篇关于作曲家要求phpoffice/phpspreadsheet无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆