Preloader
Ubuntu
  • Estimated reading time: 1 Minute

Ubuntu composer error: The requested PHP extension curl is missing from your system

This error is common when you install for first time tools that use the cURL library for common tasks. cURL is a library and command-line tool for transferring data using various protocols (in PHP).

Even if you're 100% secure that you have cURL available in your system, however it stills without work? in this article you'll learn how to solve this tedious error easily.

Why this happens

This error is caused because you don't have the curl library php5-curl installed in your system (if you already did, then you're doing something wrong).

Solution

In case you're facing this issue, you need to install curl using the Terminal. Execute the following command to solve it:

sudo apt-get install php5-curl

In case that the previous command still with errors (or any output similar to package 'php5-curl' has no installation candidate):

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-curl' has no installation candidate

Then execute a standard version of curl using instead of a specific version:

sudo apt-get install php5-curl

php-curl is a meta-package that makes the solution independent from your php version so its most likely to work.That should install curl on your system. To test it, execute the following command in a terminal:

curl --help

In the providen list you should see all the available options and arguments for curl in the console.

Share:
Carlos Delgado

Carlos Delgado

Senior Software Engineer at Corvix. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Related articles
How to install the latest version of Git in Ubuntu 20.04
26 Aug, 2022
  • Estimated reading time: 1 Minute
How to install aapanel in Ubuntu 20.04
14 Aug, 2022
  • Estimated reading time: 1 Minute
How to install Prometheus Node Exporter on Ubuntu 20.04
27 Mar, 2022
  • Estimated reading time: 4 Minutes
How to extract the content of a tar.gz file in Ubuntu
16 Nov, 2021
  • Estimated reading time: 1 Minute
How to install Anaconda in Ubuntu 20.04
6 Nov, 2021
  • Estimated reading time: 3 Minutes
How to install Elasticsearch 7 in Ubuntu 20.04
29 Apr, 2021
  • Estimated reading time: 5 Minutes
Weekly trending
AI SEO Malaysia: Google AI Overviews for Corporates
1 Jul, 2026
  • Estimated reading time: 7 Minutes
Types of Hoodie Material: A Complete Fabric Guide
1 Jul, 2026
  • Estimated reading time: 4 Minutes
PWA vs Capacitor vs Native: Choosing an App Architecture in 2026
1 Jul, 2026
  • Estimated reading time: 4 Minutes
Key Features of Premier Contact Point Explained Simply
1 Jul, 2026
  • Estimated reading time: 7 Minutes
Our Sponsors

Our blog is proudly supported by industry-leading sponsors.