Bacon / BaconQrCode

QR Code Generator for PHP
BSD 2-Clause "Simplified" License
1.83k stars 208 forks source link

Can't install BaconQrCode, Php version does not satisfy requirement. #89

Closed raahimfareed closed 3 years ago

raahimfareed commented 3 years ago

I'm trying to require it in Laravel 8 project using PHP 8 but unable to do so due to this error

✗ composer require simplesoftwareio/simple-qrcode
Using version ^4.2 for simplesoftwareio/simple-qrcode
./composer.json has been updated
Running composer update simplesoftwareio/simple-qrcode
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - bacon/bacon-qr-code[2.0.0, ..., 2.0.2] require php ^7.1 -> your php version (8.0.9) does not satisfy that requirement.
    - bacon/bacon-qr-code[2.0.3, ..., 2.0.4] require ext-iconv * -> it is missing from your system. Install or enable PHP's iconv extension.
    - simplesoftwareio/simple-qrcode 4.2.0 requires bacon/bacon-qr-code ^2.0 -> satisfiable by bacon/bacon-qr-code[2.0.0, ..., 2.0.4].
    - Root composer.json requires simplesoftwareio/simple-qrcode ^4.2 -> satisfiable by simplesoftwareio/simple-qrcode[4.2.0].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/php.ini
    - /etc/php/conf.d/xdebug.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 and ./composer.lock to their original content.
DASPRiD commented 3 years ago

You need to install ext-iconv to install 2.0.4 which is compatible with PHP 8.

NicoHood commented 2 years ago

For those who came here by google: This helped me: https://stackoverflow.com/a/64739510/14348748