Home > Enterprise >  Laravel error when installing simple-qrcode library
Laravel error when installing simple-qrcode library

Time:10-05

I need to add QR features in my project so I found siple-qr Library, but when I run

composer require simplesoftwareio/simple-qrcode

it says

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
    - Root composer.json requires simplesoftwareio/simple-qrcode ^4.2 -> satisfiable by 
simplesoftwareio/simple-qrcode[4.2.0].
    - simplesoftwareio/simple-qrcode 4.2.0 requires ext-gd * -> it is missing from your 
system. Install or enable PHP's gd extension.

To enable extensions, verify that they are enabled in your .ini files:
    - C:\xampp\php\php.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.

CodePudding user response:

Open C:\xampp\php\php.ini and search for extension=gd. Remove the ; in front of the found line. Save the changes, restart XAMPP (not sure if necessary) and you're ready to go.

composer require simplesoftwareio/simple-qrcode

Sometimes it is necessary to change the extension_dir variable to extension_dir = "ext" on windows systems. Also in the C:\xampp\php\php.ini file.

  • Related