Cover Image: PHP 8.4 on Ubuntu 24.10
Photo by Ben Griffiths on Unsplash

PHP 8.4 on Ubuntu 24.10

Tomas Norre • December 27, 2024

development

As of December 2024, the Ondřej Surý PPA does not provide support for Ubuntu 24.10. This limitation affects the installation of PHP versions, including PHP 8.4, on this Ubuntu release.

To install PHP 8.4 on Ubuntu 24.10, you can modify the PPA's configuration to use packages from Ubuntu 24.04 (Noble). Here's how:

  1. Remove and Re-add the Ondřej Surý PPA:
sudo add-apt-repository --remove ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/php 

This ensures a clean configuration of the PPA.

  1. Modify the PPA's Release Suite:
sudo sed -i 's/oracular/noble/g' /etc/apt/sources.list.d/ondrej-ubuntu-php-oracular.sources

This command changes the release suite from 'oracular' (24.10) to 'noble' (24.04), allowing you to access PHP packages intended for Ubuntu 24.04.

  1. Update Package Lists:
sudo apt update

This refreshes your package lists to include the modified PPA configuration.

  1. Install PHP 8.4:
sudo apt install php8.4

This installs PHP 8.4 from the modified PPA.

Important Considerations:

By following these steps, you can install PHP 8.4 on Ubuntu 24.10 despite the lack of direct support from the Ondřej Surý PPA.

Have fun coding.

If you find any typos or incorrect information, please reach out on GitHub so that we can have the mistake corrected.