I am trying to install spatie/laravel-medialibrary using Composer in my Laravel project, but I keep getting an SSL certificate error. Here’s the command I run:
composer require "spatie/laravel-medialibrary:^10.0.0"
And this is the error message I receive:
https://repo.packagist.org could not be fully loaded (curl error 60 while downloading https://repo.packagist.org/packages.json:
SSL certificate problem: unable to get local issuer certificate), package information was loaded from the local cache and may be out of date
In CurlDownloader.php line 390:
curl error 60 while downloading https://repo.packagist.org/p2/spatie/laravel-medialibrary.json: SSL certificate problem:
unable to get local issuer certificate
Checked my php.ini file and made sure curl.cainfo is set correctly:
Environment:
- OS: Windows
- PHP version: 8.1.10
- Composer version: 2.8.4
- Server: Laragon
What I’ve tried so far:
Checked my php.ini file and made sure curl.cainfo is set correctly:
`php -r “echo ini_get(‘curl.cainfo’);”
Output: C:laragonetcsslcacert.pem
Disabled SSL temporarily in Composer:
composer config --global disable-tls true
composer config --global secure-http false
But the error still persists.
Tried clearing Composer cache:
composer clear-cache
but I still get the same error.