I have upgraded my OpenSUSE Leap from 15.3 to 15.4.
I then want to upgrade PHP from version 7 to version 8. Before upgrade, PHP version is:
server:~ # php -v
PHP 7.4.33 (cli) (built: Nov 3 2022 12:00:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
I first started with a classic installation:
server:~ # zypper install php8
After installation is done (no particular errors/warnings mentionned), I get this:
server:~ # php -v
-bash: /usr/bin/php: No such file or directory
I then followed the official documentation for packages management which suggests to add a specific repository. I just added option -r 1
to the install
command to specify the repository ID I want to install from:
server:~ # zypper addrepo https://download.opensuse.org/repositories/home:illuusio:php-next/15.4/home:illuusio:php-next.repo
server:~ # zypper refresh
server:~ # zypper install -r 1 php8
After installation is done (no particular errors/warnings mentionned), I now get this:
server:~ # php -v
php: command not found
Both installations processes suggest to uninstall PHP7, which I did accept (I don't want to keep both php7 and php8 on my server).
I then checked these:
srv-dev01:~ # whereis php
php: /usr/share/php
srv-dev01:~ # ll /usr/share/php
total 0
I don't understand why php8 is not properly installed... I guess a link is probably needed in /usr/bin/
directory but, if so, I don't get why it is not done by the installation process... I'd like to do an install as clean as possible.
Thanks for help!