1

dev,

please has anyone came across this kinda issue, I was installing new laravel 8 and hope to install [jet-stream and livewire][1] together with it, I installed laravel 8 with the following cmd:

composer create-project --prefer-dist laravel/laravel blog

then proceed to install jet-stream with

$ composer require laravel/jetstream

this cmd result :


The "http://repo.packagist.org/p/provider-2019%2427b76b9f0218e7440cf8a7d3dfe11f6ac69610e72f5277d4ee2bf31e24c43772.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known. failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

[InvalidArgumentException] Package laravel/jetstream at version has a PHP requirement incompatible wi th your PHP version (7.2.32)

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...


i run

php -v 

and here is my php version :


PHP 7.2.32 (cli) (built: Jul 8 2020 10:38:05) ( ZTS MSVC15 (Visual C++ 2017) x6 4 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies


I have tried updating my PHP version through cm for a composer with :

$ composer config platform.php 7.4.3

and tried run

$ composer require laravel/jetstream

this then results :

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v7.28.3
    - Conclusion: don't install laravel/framework v7.28.3
    - laravel/jetstream 1.x-dev requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
    - laravel/jetstream v1.3.0 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
    - laravel/jetstream v1.3.1 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
    - laravel/jetstream v1.3.2 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
    - don't install illuminate/support 8.x-dev|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.0.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.0.1|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.0.2|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.0.3|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.0.4|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.1.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.2.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.3.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.4.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.5.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.6.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.7.0|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.7.1|don't install laravel/framework v7.28.3
    - don't install illuminate/support v8.8.0|don't install laravel/framework v7.28.3
    - Installation request for laravel/framework (locked at v7.28.3, required as ^7.24) -> satisfiable by laravel/framework[v7.28.3].
    - Installation request for laravel/jetstream ^1.3 -> satisfiable by laravel/jetstream[1.x-dev, v1.3.0, v1.3.1, v1.3.2].


Installation failed, reverting ./composer.json to its original content.

here is my composer.json


{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2.5",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3",
        "laravel/framework": "^7.24",
        "laravel/tinker": "^2.0"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "platform": {
            "php": "7.4.3"
        }
    },
    "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"
        ]
    }
}

please the problem seems visual that I needed to upgrade my PHP version but I don't know where to

please guide , thanks [1]: https://jetstream.laravel.com/

sheriff123
  • 151
  • 1
  • 3
  • 10
  • 2
    welcome to SO ... `laravel/jetstream` you cannot use in `laravel 7` for that you need `laravel 8` – Kamlesh Paul Oct 06 '20 at 08:31
  • @KamleshPaul thank you for replying, do you mean I have not yet installed laravel 8 with composer create-project --prefer-dist laravel/laravel blog ? this project was installed today – sheriff123 Oct 06 '20 at 08:55
  • in your composer.json `"laravel/framework": "^7.24"` check – Kamlesh Paul Oct 06 '20 at 08:56
  • What have you tried to resolve all these errors? Anything? Which parts are unclear? – Nico Haase Oct 06 '20 at 09:03
  • do you mean i should remove "laravel/framework": "^7.24", ? because is currently present in composer.json – sheriff123 Oct 06 '20 at 09:07
  • @NicoHaase I have tried run this: $ composer config platform.php 7.4.3 to upgrade my PHP version but still not work, please what do you suggest? – sheriff123 Oct 06 '20 at 09:08
  • `composer config platform.php 7.4.3` does not update your PHP version. It only instructs Composer to resolve dependencies specific to this version. If Jetstream is not compatible with Laravel 7, you have to start with updating Laravel to v8 – Nico Haase Oct 06 '20 at 09:12
  • what I was trying to say was that I installed laravel today and I think the latest version would have been installed or not? do I need to select? I believe the laravel create-project command create the latest version of laravel as at the time .... please enlight – sheriff123 Oct 06 '20 at 09:20
  • As you can see in your `composer.json`, you have required `"laravel/framework": "^7.24"`. This does not include v8 of Laravel – Nico Haase Oct 06 '20 at 12:17
  • @NicoHaase so should I remove it – sheriff123 Oct 07 '20 at 13:09
  • That's something you have to decide. `laravel/framework` is a pretty important package if you are implementing a Laravel application – Nico Haase Oct 07 '20 at 13:17

2 Answers2

0

It seems to me that information is lacking. but... in my case.!

composer global remove laravel / installer
composer global remove laravel / laravel **

and

composer global require laravel / installer

php -v

PHP 7.4.19 (cli) (built: May 4 2021 11:06:37) (NTS) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.19, Copyright (c), by Zend Technologies

there you can use`

composer global config platform.php 7.4.19

to configure the composer globally with your php version

now. I use jetstream

laravel new minimarket --git -f --jet

For this method install clean you laravel 8, i use Fedora 34 and maria database

-1

Please check Laravel 8 need PHP 7.3 or above (You are getting issue because you are using php7.2 )

Please check the documentation https://laravel.com/docs/8.x

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Lalit Kumar
  • 256
  • 2
  • 14