1 year ago

#325880

test-img

Sam

Unable to Get rid of php7.2 which is blocking installation of php8.0

I have a challenge in getting rid of php7.2.2 to pave way for php8.0 on my machine. I have tried to with a number of suggested solutions but still don't understand why php7.2.2 still shows up when i run php -v yet on trying to purge that specific php version the, it's not found. I have even tried to restart my pc to see if the changes would be effective but not. Please see the screenshot attached below.

commands illustrated in the screenshot

First, I started By trying to remove php7.2.2 using the following commands:- sudo apt-get --purge auto-remove php7.2.2

Second, Interactive switching mode

sudo update-alternatives --config php sudo update-alternatives --config phar sudo update-alternatives --config phar.phar

Third, I tried Manual Switching From PHP 7.2 => PHP 8.0

Default PHP 7.2 is set on the system and I had to switch to PHP 8.0. Apache:

$ sudo a2dismod php7.2 $ sudo a2enmod php8.0 $ sudo service apache2 restart

Have also tried, Command Line:

$ sudo update-alternatives --set php /usr/bin/php8.0 $ sudo update-alternatives --set phar /usr/bin/phar8.0 $ sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0

ubuntu-20.04

php-7.2

php-8

0 Answers

Your Answer

Accepted video resources