I'm trying to upgrade from PHP 5.6.35 to PHP 7.2, I did run the following command:
sudo apt install php7.2 php7.2-common php7.2-cli php7.2-cgi php7.2-fpm
All went fine, but when I tried to install laravel, it is saying my php version is 5.6 and I need to upgrade it. So I checked php path using which
which php:
/usr/local/bin/php
which php7.2:
/usr/bin/php7.2
Seems my php 7.2 is installed under /usr/bin
and my old php is under /usr/local/bin
and linux keeps reading old php version. How can I fix it so when I type php -v
I will get 7.2 version?
I'm begginer on linux and I was searching on google but could find solution for my problem. Thank you for your help.