Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install, not support for laravel v9 and above? #3

Open
ahming2000 opened this issue Jul 8, 2022 · 1 comment
Open

Cannot install, not support for laravel v9 and above? #3

ahming2000 opened this issue Jul 8, 2022 · 1 comment

Comments

@ahming2000
Copy link

Hi, I have an issue while installing this package, I was trying to connect to my IPFS container.
Some references: Links

I am using Laravel and it is run on the docker using Laravel Sail, here is my docker-compose.yml:

# For more information: https://laravel.com/docs/sail
version: '3'
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.1
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.1/app
        extra_hosts:
            - 'host.docker.internal:host-gateway'
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
            XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
            XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mysql
    mysql:
        image: 'mysql/mysql-server:8.0'
        ports:
            - '${FORWARD_DB_PORT:-3306}:3306'
        environment:
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ROOT_HOST: "%"
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ALLOW_EMPTY_PASSWORD: 1
        volumes:
            - 'sail-mysql:/var/lib/mysql'
            - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
        networks:
            - sail
        healthcheck:
            test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ]
            retries: 3
            timeout: 5s
    phpmyadmin:
        image: 'phpmyadmin/phpmyadmin'
        links:
            - mysql:mysql
        ports:
            - '8000:80'
        environment:
            MYSQL_USERNAME: "${DB_USERNAME}"
            MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
            PMA_HOST: mysql
        networks:
            - sail
    ipfs0:
        container_name: ipfs0
        image: ipfs/go-ipfs:latest
        ports:
            # - "4001:80" # ipfs swarm - expose if needed/wanted
            - "5001:5001" # ipfs api - expose if needed/wanted
            - "8080:8080" # ipfs gateway - expose if needed/wanted
        volumes:
            - ./ipfs/ipfs0:/data/ipfs
        networks:
            - sail
    cluster0:
        container_name: cluster0
        image: ipfs/ipfs-cluster:latest
        depends_on:
            - ipfs0
        environment:
            CLUSTER_PEERNAME: cluster0
            CLUSTER_SECRET: ${CLUSTER_SECRET} # From shell variable if set
            CLUSTER_IPFSHTTP_NODEMULTIADDRESS: /dns4/ipfs0/tcp/5001
            CLUSTER_CRDT_TRUSTEDPEERS: '*' # Trust all peers in Cluster
            CLUSTER_RESTAPI_HTTPLISTENMULTIADDRESS: /ip4/0.0.0.0/tcp/9094 # Expose API
            CLUSTER_MONITORPINGINTERVAL: 2s # Speed up peer discovery
        ports:
            # Open API port (allows ipfs-cluster-ctl usage on host)
            - "127.0.0.1:9094:9094"
            # The cluster swarm port would need  to be exposed if this container
            # was to connect to cluster peers on other hosts.
            # But this is just a testing cluster.
            # - "9096:9096" # Cluster IPFS Proxy endpoint
        volumes:
            - ./ipfs/cluster0:/data/ipfs-cluster
        networks:
            - sail
    ipfs1:
        container_name: ipfs1
        image: ipfs/go-ipfs:latest
        volumes:
            - ./ipfs/ipfs1:/data/ipfs
        networks:
            - sail
    cluster1:
        container_name: cluster1
        image: ipfs/ipfs-cluster:latest
        depends_on:
            - ipfs1
        environment:
            CLUSTER_PEERNAME: cluster1
            CLUSTER_SECRET: ${CLUSTER_SECRET}
            CLUSTER_IPFSHTTP_NODEMULTIADDRESS: /dns4/ipfs1/tcp/5001
            CLUSTER_CRDT_TRUSTEDPEERS: '*'
            CLUSTER_MONITORPINGINTERVAL: 2s # Speed up peer discovery
        volumes:
            - ./ipfs/cluster1:/data/ipfs-cluster
        networks:
            - sail
    ipfs2:
        container_name: ipfs2
        image: ipfs/go-ipfs:latest
        volumes:
            - ./ipfs/ipfs2:/data/ipfs
        networks:
            - sail
    cluster2:
        container_name: cluster2
        image: ipfs/ipfs-cluster:latest
        depends_on:
            - ipfs2
        environment:
            CLUSTER_PEERNAME: cluster2
            CLUSTER_SECRET: ${CLUSTER_SECRET}
            CLUSTER_IPFSHTTP_NODEMULTIADDRESS: /dns4/ipfs2/tcp/5001
            CLUSTER_CRDT_TRUSTEDPEERS: '*'
            CLUSTER_MONITORPINGINTERVAL: 2s # Speed up peer discovery
        volumes:
            - ./ipfs/cluster2:/data/ipfs-cluster
        networks:
            - sail
networks:
    sail:
        driver: bridge
volumes:
    sail-mysql:
        driver: local

Error message:

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

  Problem 1
    - Root composer.json requires rootsoft/laravel-ipfs ^0.0.1 -> satisfiable by rootsoft/laravel-ipfs[0.0.1].     
    - rootsoft/laravel-ipfs 0.0.1 requires league/flysystem ^1.1.3 -> found league/flysystem[1.1.3, ..., 1.x-dev] b
ut the package is fixed to 3.0.21 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Have tried delete the vendor folder and install this package first, another error message come out:

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

  Problem 1
    - Conclusion: don't install laravel/framework v9.11.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.12.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.12.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.12.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.13.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.14.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.14.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.15.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.16.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.17.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.18.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v9.19.0 (conflict analysis result)
    - Conclusion: don't install league/flysystem 3.1.0 (conflict analysis result)
    - Root composer.json requires laravel/framework ^9.11 -> satisfiable by laravel/framework[v9.11.0, ..., 9.x-dev].
    - Conclusion: don't install league/flysystem 3.0.23 (conflict analysis result)
    - Root composer.json requires rootsoft/laravel-ipfs ^0.0.1 -> satisfiable by rootsoft/laravel-ipfs[0.0.1].     
    - Conclusion: don't install league/flysystem[3.0.21] | install league/flysystem[1.1.9] (conflict analysis result)
    - Conclusion: don't install league/flysystem[3.0.20] | install league/flysystem[1.1.9] (conflict analysis result)
    - Conclusion: don't install league/flysystem[3.0.19] | install league/flysystem[1.1.9] (conflict analysis result)
    - Conclusion: don't install league/flysystem[3.0.18] | install league/flysystem[1.1.9] (conflict analysis result)
    - Conclusion: don't install league/flysystem[3.0.17] | install league/flysystem[1.1.9] (conflict analysis result)
    - Conclusion: don't install league/flysystem[3.0.16] | install league/flysystem[1.1.9] (conflict analysis result)
    - Conclusion: don't install league/flysystem 1.1.9 (conflict analysis result)
    - rootsoft/laravel-ipfs 0.0.1 requires league/flysystem ^1.1.3 -> satisfiable by league/flysystem[1.1.3, ..., 1.x-dev].
    - You can only install one version of a package, so only one of these can be installed: league/flysystem[1.1.3, ..., 1.x-dev, 3.0.0, ..., 3.x-dev].
    - laravel/framework 9.x-dev requires league/flysystem ^3.0.16 -> satisfiable by league/flysystem[3.0.16, ..., 3.x-dev].
    - Conclusion: don't install league/flysystem[3.0.22] | install league/flysystem[1.1.9] (conflict analysis result)


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

My composer.json:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^8.1.0",
        "guzzlehttp/guzzle": "^7.2",
        "intervention/image": "^2.7",
        "laravel/framework": "^9.11",
        "laravel/sanctum": "^2.14.1",
        "laravel/tinker": "^2.7",
        "robinvdvleuten/ulid": "^5.0"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.14",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Do anyone face the same problem like me? Please tell me if you know anything, thank you.

@LAM-ZHENG-XUAN
Copy link

If you are running composer install or composer update add --ignore-platform-reqs behind the command
For exp: composer install --ignore-platform-reqs
I hope this can help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants