PHP 8.4 on Ubuntu 24.10
Tomas Norre •
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:
- 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.
- 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.
- Update Package Lists:
sudo apt update
This refreshes your package lists to include the modified PPA configuration.
- Install PHP 8.4:
sudo apt install php8.4
This installs PHP 8.4 from the modified PPA.
Important Considerations:
- Compatibility: Using packages from a different Ubuntu release can lead to compatibility issues. Proceed with caution and test thoroughly.
- Official Support: This method is a workaround and may not be officially supported. Monitor for any issues and consider consulting official Ubuntu or PHP resources for guidance.
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.