Software⏱️ 2 min read📅 2026-05-31

How to Fix: Composer install error - requires ext_curl when it's actually enabled

Composer requires ext-curl to be installed on your system.

Quick Answer: Try running "php -r 'extension_loaded('curl') ? '' : die('ext_curl is not loaded');'" in your terminal to confirm the curl extension is enabled.

You are correct that the curl extension is enabled, but it seems like Composer is not detecting it correctly. This issue can occur due to various reasons such as missing or corrupted configuration files, incorrect PHP version, or conflicting extensions.

⚠️ Common Causes

  • Missing or corrupted configuration files in the PHP configuration directory.

🛠️ Step-by-Step Verified Fixes

Method 1: Enable the curl extension manually

  1. Step 1: Open your terminal or command prompt and type `php -m` to check the loaded PHP extensions.

Method 2: Check and update your PHP version

  1. Step 1: Open your terminal or command prompt and type `php -v` to check your current PHP version.

Method 3: Reconfigure Composer

  1. Step 1: Run the command `composer config set curl.allow-insecure-https on` to enable insecure HTTPS.

💡 Conclusion

By following these steps, you should be able to resolve the Composer install error and successfully install the Facebook PHP SDK.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions