genesisweb / valet-linux-plus

Advanced local development experience for Linux.
MIT License
143 stars 23 forks source link

Switching PHP version not working #89

Closed bkno closed 1 year ago

bkno commented 1 year ago

Hi, an extra documentation step is needed for the use command for switching PHP versions.

I am running PHP 8.1 in Ubuntu 22.10. When I enter valet use 7.4 it says:

valet use 7.4
Changing php-fpm version...
Stopping php8.1-fpm...
Disabling php8.1-fpm...
Php8.1-fpm has been disabled
[php7.4-fpm] is not installed, installing it now via Apt... 🍻
Reading package lists...
Building dependency tree...
Reading state information...
Package php7.4-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php7.4-fpm' has no installation candidate

Enabling php8.1-fpm...
Php8.1-fpm has been enabled
Changing version failed

In Apt.php line 95:

  Apt was unable to install [php7.4-fpm]

I am assuming this is because an additional repo is required. It seems for Ubuntu the recommend one is Ondrej PPA one?

The installation step for this is:

sudo add-apt-repository ppa:ondrej/php
sudo apt update

The docs are primarily focused on Ubuntu so I think it is worth including. Then if someone is on a different distro, at least they know they will need to find an equivalent.

Thanks, keep up the good work.

uttamrabadiya commented 1 year ago

Thank you @bkno, We will include this in our documentation.