How to fix laravel new project not working: not installed: openssl/adhs-validation and not installed: openssl/pkey and not installed: php-xml?
When you encounter an error message in Laravel stating that certain packages are not installed, such as "openssl/adhs-validation", "openssl/pkey", and "php-xml", it usually means that those packages are missing from your project's dependencies. Here are the steps to fix this issue:
- Check your Laravel installation: Make sure that you have installed Laravel correctly on your system. You can check this by running the following command in your terminal or command prompt:
composer global require laravel/installer
If you have already installed Laravel, you can check your version by running:
laravel --version
- Create a new Laravel project: If you haven't created a new Laravel project yet, you can create one by running the following command:
laravel new project-name
Replace "project-name" with the name of your project.
- Check your composer.json file: Open the composer.json file located in the root directory of your Laravel project. Check if the missing packages are listed under the "require" section. If not, add them to the file as follows:
{
"require": {
"laravel/framework": "^8.x",
"openssl/adhs-validation": "^1.1",
"openssl/pkey": "^1.0",
"php-xml": "^7.2"
}
}
Save the file and close it.
- Install the missing packages: Run the following command in your terminal or command prompt to install the missing packages:
composer install
This command will install all the dependencies listed in your composer.json file, including the missing packages.
- Check for any other errors: After installing the missing packages, run the following command to check for any other errors:
php artisan serve
If you encounter any other errors, you may need to troubleshoot them individually.
By following these steps, you should be able to fix the issue of missing packages in your Laravel project.