PHP - How to install php-curl without downgrading PHP version

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I'm trying to install the php5-curl package, but I'm getting the dependency error:

The following packages have unmet dependencies:
 php5-curl : Depends: phpapi-20090626
             Depends: php5-common (= 5.3.10-1ubuntu3.11) but 5.5.5+dfsg-1+debphp.org~precise+2 is to be installed
E: Unable to correct problems, you have held broken packages.

I have found this guide here on Askubuntu, but I'm afraid that will downgrade my php installation to an older version, which I don't want.

This is the PHP version I have installed:

tomica@as5830tg-elementary:~/Documents/apktool$ php --version
PHP 5.5.5-1+debphp.org~precise+2 (cli) (built: Oct 28 2013 12:57:03) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

Is there any way for me to keep the PHP 5.5.5-1 and still install php-curl?

profilepic.png
manpreet 2 years ago

I have been using ppa:ondrej/php5 for PHP. This PPA includes php5-curl and FYI:

$ php --version

PHP 5.5.12-2+deb.sury.org~precise+1 (cli)

In case you aren't aware, adding the PPA will update all PHP packages installed on your system to the latest in the PPA, assuming the PPA has a more recent version. Best performed on a test machine.

If you are like me, you research who the owners and contributors of PPAs are. The owner and, so far, sole contributor to this PPA has a very high karma on Launchpad, regularly updates the PPAs he manages, and googling his email address reveals he is very active on a number of FOSS projects. As of the time of this answer, I consider the PPA reliable.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community