E:无法找到软件包 php5-intl Ubuntu 16.04

E:无法找到软件包 php5-intl Ubuntu 16.04

我尝试更新作曲家但收到此错误:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 2
    - The requested package bower-asset/admin-lte could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package bower-asset/font-awesome could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package bower-asset/html5shiv could not be found in any version, there may be a typo in the package name.
  Problem 5
    - The requested package bower-asset/jquery-slimscroll could not be found in any version, there may be a typo in the package name.
  Problem 6
    - The requested package bower-asset/flot could not be found in any version, there may be a typo in the package name.

因此我尝试使用以下命令安装 php5-intl 扩展:sudo apt-get install php5-intl。但遗憾的是我收到了这个错误...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php5-intl

那么,我需要做什么来解决这个问题?我正在使用 Ubuntu 16.04。

答案1

Ubuntu 16.04 附带 php7。因此,除非您特意安装了 php5,否则您尝试添加的模块版本是错误的。

尝试...

apt-get install php7.0-intl

答案2

在我的 Ubuntu 16.04.4 LTS 和 PHP5.6 上,以下命令运行良好。

sudo apt-get install php5.6-intl

相关内容