php - 安装报错PHP5-Curl Ubuntu Server

标签 php ubuntu curl ubuntu-server php-curl

PHP 5.6.4-4ubuntu6 (cli)(构建时间:2015 年 4 月 17 日 15:47:51)

描述:Ubuntu 14.04.5 LTS 发布:14.04

apt-get install php5-curl

Read package lists ... Done
Dependency tree is established.
Status information is read in .... Done
Try "apt-get -f install" to correct this:
The following packages have unfulfilled dependencies:
  libfontconfig1: Depends on: fontconfig-config (= 2.11.0-0ubuntu4.2) but 2.11.94-0ubuntu2 is to be installed
  php5-curl: Depends on: libcurl3 (> = 7.18.0) should not be installed
              Depends on: phpapi-20121212
              Depends on: php5-common (= 5.5.9 + dfsg-1ubuntu4.22) but 5.6.4 + dfsg-4ubuntu6 should be installed
E: Unfulfilled dependencies. Try "apt-get -f install" without specifying a package (or specify a solution).

“sudo apt-get install software-properties-common”的输出:

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Probieren Sie »apt-get -f install«, um dies zu korrigieren:
Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 libfontconfig1 : Hängt ab von: fontconfig-config (= 2.11.0-0ubuntu4.2) aber 2.11.94-0ubuntu2 soll installiert werden
 software-properties-common : Hängt ab von: python-apt-common (>= 0.9) soll aber nicht installiert werden
                              Hängt ab von: python3-dbus soll aber nicht installiert werden
                              Hängt ab von: python3-software-properties (= 0.92.37.8) soll aber nicht installiert werden
E: Unerfüllte Abhängigkeiten. Versuchen Sie »apt-get -f install« ohne Angabe eines Pakets (oder geben Sie eine Lösung an).

最佳答案

可以按如下方式安装php5-curl

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5-curl

如果您不成功,您可能需要先卸载旧的 php 包。

sudo apt-get remove php5 php5-common php5-mysql php5-xmlrpc php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear php5-dev php5-imap php5-mcrypt

关于php - 安装报错PHP5-Curl Ubuntu Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46524906/

相关文章:

php - 从 PHP SDK 获取 AWS IAM 凭证

php - 从 MySQL 访问表到 android

c++ - 如何在 Ubuntu 中使 TensorFlow-lite 可用于整个系统

linux - 安装错误: editing Linux compile file

java - 为什么 cURL 不将 cookie 的过期/最大年龄值发送回服务器?

javascript - 在ajax中火回两次成功

javascript - 禁用点不隐藏。 [ Highcharts ]

linux - 如何在 GNOME 中使用 C/C++ 更改文件图标的标志?

perl - 相当于此 perl 代码的curl 命令行

php - uwamp drupal 8 安装新模块失败