我在Ubuntu 16.10上安装了https://askubuntu.com/questions/761713/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04
中概述的共存php包我已经运行了apt-get update和apt-get upgrade。当我尝试安装php-curl时,我收到一条错误消息:
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:/$
我该如何解决?
答案 0 :(得分:0)
首先搜索您的系统以确保您拥有它。
apt-cache search php | grep -i curl
<强> 结果 强>
php5-curl - CURL module for php5
现在使用:
apt-get install php5-curl -y
答案 1 :(得分:0)
你可以通过以下步骤解决: -
sudo apt-get install curl
sudo apt-get install php5.6-curl