The errors indicate that the current PHP version installed on the system is 8.1.10, but the required PHP version for the packages being used is 7.1.3 or lower. To resolve this issue, you can either downgrade the PHP version to 7.1.3 or upgrade the packages to versions that are compatible with PHP 8.1.10.
To downgrade the PHP version, you can follow the steps below:
- Uninstall the current PHP version using the command:
sudo apt-get remove php8.1
- Install PHP 7.1.3 using the command:
sudo apt-get install php7.1
- Restart the web server using the command:
sudo service apache2 restart
To upgrade the packages to versions that are compatible with PHP 8.1.10, you can update the composer.json file to specify the latest versions of the packages that are compatible with PHP 8.1.10. For example, to update the laravel/framework package to the latest version that is compatible with PHP 8.1.10, you can add the following line to the composer.json file:
"laravel/framework": "^8.0"
Then run the following command to update the packages:
composer update
This will update the packages to the latest versions that are compatible with PHP 8.1.10.
