mario@fedora:~$ sudo update-alternatives --install /usr/bin/php php /usr/bin/php74 90
mario@fedora:~$ sudo update-alternatives --install /usr/bin/php php /usr/bin/php84 80
mario@fedora:~$ sudo update-alternatives --config php
There are 3 programs which provide 'php'.
Selection Command
-----------------------------------------------
*+ 1 /usr/bin/php
2 /usr/bin/php84
3 /usr/bin/php74
Enter to keep the current selection[+], or type selection number: 2
failed to link /usr/bin/php -> /etc/alternatives/php: /usr/bin/php exists and it is not a symlink
mario@fedora:~$ php -v
PHP 8.2.21 (cli) ....
Hi. I can’t manage to set alternatives. Please help me.
rsdev@fedora:/usr/bin$ sudo alternatives --config php
There are 3 programs which provide 'php'.
Selection Command
-----------------------------------------------
+ 1 /usr/bin/php74
2 /usr/bin/php84
* 3 /usr/bin/php
Enter to keep the current selection[+], or type selection number: 1
rsdev@fedora:/usr/bin$ php -v
bash: /usr/bin/php: No such file or directory
I can’t understand what I am doing wrong…
rsdev@fedora:/usr/bin$ ls -l /etc/alternatives/php
lrwxrwxrwx. 1 root root 15 oct 5 16:54 /etc/alternatives/php -> /usr/bin/php8.1
rsdev@fedora:/usr/bin$ ls -l /usr/bin/php8.1
ls: cannot access '/usr/bin/php8.1': No such file or directory