How to install PHP intl extension in Ubuntu 14.04

How to install PHP intl extension in Ubuntu 14.04

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Diagnosing Missing Packages on Legacy Ubuntu

When attempting to install the PHP intl extension on Ubuntu 14.04, the standard approach often fails immediately. Running sudo apt-get install php5-intl results in an Unable to locate package error because the default repositories for that specific release do not contain this package by default. This omission is particularly problematic when deploying applications reliant on internationalization libraries, such as Zend Framework 2, which throws a fatal error: Zend\I18n\Validator component requires the intl PHP extension. Without this extension, your application cannot handle locale-specific operations like date formatting or currency conversion, causing immediate failure upon initialization.

The root cause of the missing package lies in the relationship between Ubuntu 14.04 and PHP versioning. The system's default PHP installation on 14.04 is typically version 5.4.x or early 5.5.x. While you mentioned running PHP 5.5.9, the php5-intl package was not always included in the standard main repository for this specific LTS release. Often, these packages are only available via third-party PPA (Personal Package Archives) or require upgrading the PHP version to a point where the extension is officially supported in the Ubuntu repositories.

To resolve this without upgrading the entire system (which might break dependencies on other legacy tools), you must manually enable the necessary repository. The most reliable method involves adding the ppa:ondrej/php repository, which hosts newer versions of PHP and their extensions for older Ubuntu releases. Execute the following commands in your terminal:

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

Adding this PPA pulls in a patched version of PHP 5 that includes the intl extension compiled against it. After installation, verify that the extension is loaded by checking the active modules:

php -m | grep intl

If the list displays intl, the installation was successful. You may also need to restart your web server (Apache or Nginx with PHP-FPM) to ensure the new configuration takes effect. For Apache, this usually means running sudo service apache2 restart. If you are using a custom setup with PHP CLI, no restart is necessary unless the extension is loaded dynamically via php.ini.

There is a significant trade-off to consider here. Ubuntu 14.04 reached its end-of-life in April 2019, meaning it no longer receives security updates from Canonical. Relying on PPAs like Ondrej's for PHP 5.x means you are using software that is no longer under the official long-term support umbrella of the distribution itself. While this allows you to get the required intl extension and fix your Zend Framework 2 issues, it introduces potential security risks if you do not diligently manage patching.

If your application stack allows for it, upgrading PHP from version 5.5 to version 7.x or higher is a more sustainable solution. Newer PHP versions come with native support for intl in their standard repositories on supported Ubuntu releases. However, this requires rewriting configuration files and potentially updating third-party libraries like Zend Framework 2, as the framework has deprecated support for PHP 5 in later major versions.

Before deploying to production, ensure you check the error logs of your web server. The initial Unable to locate package error is a repository issue, but once installed, you might encounter segmentation faults if the underlying C libraries required by intl (such as libicu) are outdated. These dependencies can sometimes lag behind the PHP version, causing crashes in complex i18n operations.

If your project involves Laravel or similar modern frameworks, note that they have dropped support for PHP 5 years ago. If you are maintaining a legacy codebase on Ubuntu 14.04 specifically for Zend Framework 2, sticking to the manual PPA installation is the only viable path forward, provided you understand the security implications of running an unsupported OS version in a production environment. For more details on managing PHP versions across different distributions, resources like https://laravelcompany.com often provide guidance on migration paths and compatibility matrices for modern stacks, though those specific articles may not apply directly to the legacy constraints of PHP 5.

Our network