initially, I needed a library that will help me upload data to Excel, found this library and then there was a problem
i try to install composer require phpoffice/phpspreadsheet but i have problem
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.
I don’t understand where the error comes from, because there is a dependency “ext-spltype”: “*” in my composer.json
this is my 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": "*" }, "config": { "optimize-autoloader": true, "preferred-install": { "*": "dist" }, "sort-packages": true }, "autoload": { "psr-4": { "App\": "src/" } }, "autoload-dev": { "psr-4": { "App\Tests\": "tests/" } }, "replace": { "paragonie/random_compat": "2.*", "symfony/polyfill-ctype": "*", "symfony/polyfill-iconv": "*", "symfony/polyfill-php72": "*", "symfony/polyfill-php71": "*", "symfony/polyfill-php70": "*", "symfony/polyfill-php56": "*" }, "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" ], "post-update-cmd": [ "@auto-scripts" ] }, "conflict": { "symfony/symfony": "*" }, "extra": { "symfony": { "allow-contrib": false, "require": "5.1.*" } } }
i also try to install sudo pecl install SPL_Types , but i have error
Advertisement
Answer
I’m using Ubuntu 18.04 with Apache. Using the script from here works.
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