1

I installed on Ubuntu 16.10 the co-existing php packages as outlined in https://askubuntu.com/questions/761713/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04

I've run apt-get update and apt-get upgrade. When I try to install php-curl I get an error message:

randall@randall-VirtualBox3:/$ sudo apt-get install php5.6-curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php5.6-curl
E: Couldn't find any package by glob 'php5.6-curl'
E: Couldn't find any package by regex 'php5.6-curl'
randall@randall-VirtualBox3:/$ php -v
PHP 5.6.30-12~ubuntu16.10.1+deb.sury.org+1 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.5.4, Copyright (c) 2002-2017, by Derick Rethans
randall@randall-VirtualBox3:/$ 

How do I fix?

2
  • Possible duplicate of How to install php-curl in Ubuntu 16.04 Commented Aug 29, 2017 at 22:38
  • Confirm that you have that version available sudo apt-cache search php|grep curl You may not have the proper version available. Commented Aug 29, 2017 at 22:42

2 Answers 2

4

To install php5.6-curl or anything, when you ran into trouble

  • first search your system to ensure that you have it in there.

    apt-cache search php | grep -i curl

Result

php5-curl - CURL module for php5

Now use:

apt-get install php5-curl -y

NJOY

Sign up to request clarification or add additional context in comments.

4 Comments

If I grep the cache I don't see a php5.6-curl. I'm using this repository launchpad.net/%7Eondrej/+archive/ubuntu/php/…. I have to use php 5.* the web application I'm working on doesn't support a later version.
What did you see ? any php5-curl ? make sure that you do apt-get update && apt-get upgrade -y to update your repo then do grep command again.
Yes I had ran those commands. No php5-curl - "package ... is not avaiable".
try apt-get install php-curl then
3

u can fix by following steps:-

sudo apt-get install curl

sudo apt-get install php5.6-curl

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.