Software & AppsOperating SystemLinux

How To Fix “E: Package ‘libcurl3’ has no installation candidate” Error in Ubuntu 21.04

Ubuntu 10

In this article, we will discuss how to resolve the error message “E: Package ‘libcurl3’ has no installation candidate” in Ubuntu 21.04. This error typically indicates that the ‘libcurl3’ package is not available in the repositories you have enabled on your system.

Understanding the Error

The ‘libcurl3’ package is a client-side URL transfer library, supporting a wide range of protocols. It’s commonly used in many applications, but it may not be available in the repositories for Ubuntu 21.04. When you try to install it, you might encounter this error.

Step 1: Update and Upgrade Your System

The first step in resolving this issue is to ensure that your system is up-to-date. This can be done by running the following commands:

sudo apt update

The sudo command is used to run the following command as a superuser. The apt update command fetches the package lists from the repositories and updates them to get information on the newest versions of packages and their dependencies.

sudo apt upgrade

The apt upgrade command will upgrade all the installed packages on your system.

Step 2: Check Availability of ‘libcurl4’

Since ‘libcurl3’ is not available, you can check if ‘libcurl4’ is available on your system. Run the following command:

apt-cache policy libcurl4

The apt-cache policy command shows the installed and candidate versions of a package.

Step 3: Install ‘libcurl4’

If ‘libcurl4’ is available, you can install it by running the following command:

sudo apt install libcurl4

The apt install command is used to install a package.

Step 4: Install ‘php7.2-curl’

After installing ‘libcurl4’, you can now install the ‘php7.2-curl’ extension by running:

sudo apt install php7.2-curl

This command installs the ‘php7.2-curl’ extension, which allows you to make HTTP requests in PHP.

Troubleshooting

If the above steps do not resolve the issue, it’s possible that you have added non-standard repositories or sources to your system, causing conflicts. You may need to enable additional repositories or sources to install it.

Remember to always ensure that your package management is in order before installing new software by running ‘sudo apt update’ and ‘sudo apt upgrade’ commands.

Conclusion

Resolving the “E: Package ‘libcurl3’ has no installation candidate” error in Ubuntu 21.04 involves updating your system, checking for the availability of ‘libcurl4’, and installing ‘libcurl4’ and ‘php7.2-curl’. If these steps do not resolve the issue, you may need to check your repositories and sources. Always ensure your system is up-to-date before installing new software.

For more information on managing packages in Ubuntu, you can refer to the official Ubuntu documentation.

Why am I getting the “E: Package ‘libcurl3’ has no installation candidate” error in Ubuntu 21.04?

This error occurs when the ‘libcurl3’ package is not available in the repositories you have enabled on your system.

How can I resolve the “E: Package ‘libcurl3’ has no installation candidate” error?

To resolve this error, you can update and upgrade your system, check the availability of ‘libcurl4’, install ‘libcurl4’, and then install the ‘php7.2-curl’ extension.

What does the ‘libcurl3’ package do?

The ‘libcurl3’ package is a client-side URL transfer library that supports a wide range of protocols. It is commonly used in many applications.

What is the purpose of running ‘sudo apt update’ and ‘sudo apt upgrade’ commands?

Running ‘sudo apt update’ fetches the package lists from the repositories and updates them with information on the newest versions of packages and their dependencies. ‘sudo apt upgrade’ upgrades all the installed packages on your system.

What should I do if the above steps do not resolve the issue?

If the above steps do not resolve the issue, it is possible that you have added non-standard repositories or sources to your system, causing conflicts. You may need to enable additional repositories or sources to install the package.

Leave a Comment

Your email address will not be published. Required fields are marked *