So I am new to php/laravel and am trying to set up my environment here with composer on opensuse 15.0.
When I try to run php artisan migrate
I get this error:
PHP Warning: require(/home/mattyo/FirstLaravelProject/matt-project-laravel/vendor/autoload.php): failed to open stream: No such file or directory in /home/mattyo/FirstLaravelProject/matt-project-laravel/artisan on line 18
PHP Fatal error: require(): Failed opening required '/home/mattyo/FirstLaravelProject/matt-project-laravel/vendor/autoload.php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR') in /home/mattyo/FirstLaravelProject/matt-project-laravel/artisan on line 18
I get the same error when trying to run php artisan serve
.
I have tried to run composer update
along with composer install
composer update --no-scripts
and had no luck.
Any help would be greatly appreciated.
here's my composer.json
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
After running composer global require laravel/installer
I received the following error message:
Changed current directory to /home/mattyo/.config/composer
Using version ^3.0 for laravel/installer
./composer.json has been updated
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer[v3.0.0, ..., v3.0.1] require ext-zip * -> it is missing from your system. Install or enable PHP's zip extension.
- laravel/installer[v3.1.0, ..., v3.2.0] require php ^7.2.9 -> your php version (7.2.5) does not satisfy that requirement.
- Root composer.json requires laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1, v3.1.0, v3.2.0].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php7/cli/php.ini
- /etc/php7/conf.d/ctype.ini
- /etc/php7/conf.d/dom.ini
- /etc/php7/conf.d/iconv.ini
- /etc/php7/conf.d/json.ini
- /etc/php7/conf.d/mbstring.ini
- /etc/php7/conf.d/openssl.ini
- /etc/php7/conf.d/pdo.ini
- /etc/php7/conf.d/pdo_sqlite.ini
- /etc/php7/conf.d/phar.ini
- /etc/php7/conf.d/sqlite3.ini
- /etc/php7/conf.d/tokenizer.ini
- /etc/php7/conf.d/xmlreader.ini
- /etc/php7/conf.d/xmlwriter.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.