Change from update-alternatives command not taking effect
0
votes
1
answer
4616
views
I tried to change my PHP CLI version with
sudo update-alternatives --config php
:
There are 2 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php8.1 81 auto mode
* 1 /usr/bin/php8.0.15 1 manual mode
2 /usr/bin/php8.1 81 manual mode
I set it to 0 and checked it with update-alternatives --display php
:
php - auto mode
link best version is /usr/bin/php8.1
link currently points to /usr/bin/php8.1
link php is /usr/bin/php
slave php.1.gz is /usr/share/man/man1/php.1.gz
/usr/bin/php8.0.15 - priority 1
/usr/bin/php8.1 - priority 81
slave php.1.gz: /usr/share/man/man1/php8.1.1.gz
It looks like it worked, but if I check it with php -v
then I get:
PHP 8.0.15 (cli) (built: Jun 7 2022 10:21:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.15, Copyright (c) Zend Technologies
command -v php
outputs /usr/local/bin/php
.
----------
I'm using Ubuntu 22.04 LTS
Asked by Black
(2138 rep)
Jun 8, 2022, 07:34 AM
Last activity: Jul 4, 2022, 01:47 PM
Last activity: Jul 4, 2022, 01:47 PM