Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
448 views
in Technique[技术] by (71.8m points)

I failed to install my laravel 8 app on live server with PHP 7.3

I tried to upload my laravel 8 app on remote server with ubuntu 18 and PHP 7.3.26-1+ubuntu18.04.1+deb.sury.org+1

but I got error running composer :

 composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires unicodeveloper/laravel-emoji 1.0.* -> satisfiable by unicodeveloper/laravel-emoji[1.0.0].
    - Conclusion: don't install laravel/framework v8.26.1 (conflict analysis result)
    - unicodeveloper/laravel-emoji 1.0.0 requires illuminate/support 5.* -> satisfiable by illuminate/support[v5.0.0, ..., 5.8.x-dev].
    - Only one of these can be installed: illuminate/support[dev-master, v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v8.26.1, 8.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^8.26.1 -> satisfiable by laravel/framework[v8.26.1, 8.x-dev].

On my local server (also ubuntu 18 ) I have PHP 7.4.13

In composer.json of my project :

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "cviebrock/eloquent-sluggable": "^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "grimzy/laravel-mysql-spatial": "^5.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "inacho/php-credit-card-validator": "^1.0",
        "intervention/image": "^2.5",
        "jenssegers/agent": "^2.6",
        "laravel/fortify": "^1.7",
        "laravel/framework": "^8.26.1",
        "laravel/sanctum": "^2.8",
        "laravel/tinker": "^2.5",
        "laravelcollective/html": "^6.2",
        "mews/purifier": "^3.3",
        "mobiledetect/mobiledetectlib": "^2.8",
        "pragmarx/countries-laravel": "^0.7.0",
        "spatie/browsershot": "^3.41",
        "spatie/geocoder": "^3.10",
        "spatie/laravel-image-optimizer": "^1.6",
        "spatie/laravel-permission": "^3.18",
        "toin0u/geocoder-laravel": "^4.4",
        "twilio/sdk": "^6.15",
        "wboyz/laravel-enum": "^0.2.1",
        "webpatser/laravel-uuid": "^3.0",
        "unicodeveloper/laravel-emoji": "1.0.*",
        "yajra/laravel-datatables-oracle": "^9.15"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^0.0.5",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "files": [
            "app/library/helper.php"
        ],
        "psr-4": {
            "App\": "app/",
            "Database\Factories\": "database/factories/",
            "Database\Seeders\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "post-update-cmd": [
        "@php artisan cache:clear"
    ],
    "post-install-cmd": [
        "@php artisan cache:clear"
    ],
    "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"
        ]
    }
}

Is it issue of PHP 7.3/PHP 7.4 difference and how it can be fixed ?

Thanks!

question from:https://stackoverflow.com/questions/66049047/i-failed-to-install-my-laravel-8-app-on-live-server-with-php-7-3

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Maybe you could use this package instead: https://github.com/spatie/emoji It requires php ^7.2|^8.0 so should work on both your environments.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...