0

I'm trying to install an older version of PHP 8.0 in my ubuntu the version is 8.0.14 I tried several ways ...

sudo add-apt-repository --yes ppa:ondrej/php
sudo apt install php8.0.14

I get this error message

E: Unable to locate package php8.0.14
E: Couldn't find any package by glob 'php8.0.14'

and when Installing php8.0 I get the newer build which I don't need

PHP 8.0.19 (cli) (built: May 17 2022 18:48:59) ( NTS )

I also tried to compile it from source but the process takes a lot of time and fails every time ...

So is there any good way that I'm missing, or an auto bash script that installs a specific php version of user choice ?

1
  • Does sudo apt install php8.0 work?
    – A.L
    Commented Aug 7, 2022 at 14:17

1 Answer 1

0

You can try Synaptic Package Manager. Choose the installed package, hit ^E (or choose "Package -> Force Version" from the menu) and choose an older version which exist in repository.

Please remember. In majority of cases, once a new version comes out - the old one is removed from the repository. Only few packages have a history inside the official repositories.

If the desired version is not in the repository - you would have to download source and compile yourself.

2
  • the ubuntu is a server and not a desktop.
    – kadi-dz
    Commented May 29, 2022 at 8:52
  • Actually, Ubuntu is a distributive. Which has a desktop option by default, and can be reduced to server... But there is a workaround for your problem - set up a desktop version on another machine and there you can learn from Synaptic does the PHP have the desired version in repository or not. Or which versions there are? And after that - you can fall back to a compiling the desired version from source.
    – White Owl
    Commented May 29, 2022 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .