最初,我需要一个库来帮助我将数据上传到 Excel,找到了这个库,然后出现了问题我尝试安装Composer require phpoffice/phpspreadsheet 但我有问题Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested PHP extension ext-spltype * is missing from your system. Install or enable PHP's spltype extension.Installation failed, reverting ./composer.json to its original content.我不明白错误来自哪里,因为我的composer.json中有一个依赖项 "ext-spltype": "*"这是我的composer.json{ "type": "project", "license": "proprietary", "require": { "php": "^7.2.5", "ext-ctype": "*", "ext-iconv": "*", "sensio/framework-extra-bundle": "^5.5", "symfony/asset": "5.1.*", "symfony/console": "5.1.*", "symfony/dotenv": "5.1.*", "symfony/expression-language": "5.1.*", "symfony/flex": "^1.3.1", "symfony/form": "5.1.*", "symfony/framework-bundle": "5.1.*", "symfony/http-client": "5.1.*", "symfony/intl": "5.1.*", "symfony/mailer": "5.1.*", "symfony/mime": "5.1.*", "symfony/monolog-bundle": "^3.1", "symfony/notifier": "5.1.*", "symfony/orm-pack": "^1.0", "symfony/process": "5.1.*", "symfony/security-bundle": "5.1.*", "symfony/serializer-pack": "*", "symfony/string": "5.1.*", "symfony/translation": "5.1.*", "symfony/twig-pack": "^1.0", "symfony/validator": "5.1.*", "symfony/web-link": "5.1.*", "symfony/yaml": "5.1.*", "ext-spltype": "*" }, "require-dev": { "symfony/debug-pack": "*", "symfony/maker-bundle": "^1.19", "symfony/profiler-pack": "*", "symfony/test-pack": "*" },我也尝试安装 sudo pecl install SPL_Types ,但我有错误
3 回答
HUH函数
TA贡献1836条经验 获得超4个赞
我正在使用 Ubuntu 18.04 和 Apache。使用这里的脚本是有效的。
sudo apt-get install libpcre3-dev php5-dev php-pear -y
sudo pecl install SPL_Types
echo extension=spl_types.so | sudo tee /etc/php5/mods-available/spl_types.ini
sudo php5enmod spl_types
sudo service apache2 reload
慕侠2389804
TA贡献1719条经验 获得超6个赞
这是一个 PHP PECL 扩展,它的安装由 Composer 管理: https://www.php.net/manual/en/spl-types.installation.php
Composer 只是检查它是否存在,如果不存在则失败。
- 3 回答
- 0 关注
- 180 浏览
添加回答
举报
0/150
提交
取消