No matter what I do, I keep getting "Your requirements could not be resolved to an installable set of packages"

Hi, I am using the latest Bedrock, php 7.1 .24 locally (which Bedrock requires). I am using Bedrock-Capistrano to deploy to a Media Temple DV box running php 7.1.26. I am using Sage 8.5.4 (though this shouldn’t matter). I have no problem deploying to Media Temple Grid/Shared, but no matter how much I properly customize the DV box, I can’t get past this error:

DEBUG [777a47fb] Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

** DEBUG [777a47fb] Your requirements could not be resolved to an installable set of packages.**

Here is all my relevant info. I’ve been trying to deploy this site for DAYS. Anyone?


My /deploy/production.rb for when I do “cap production deploy”

    set :stage, :production

    # Simple Role Syntax
    # ==================
    role :app, %w{xx.xx.xx.xxx}
    role :web, %w{xx.xx.xx.xxx}
    role :db,  %w{xx.xx.xx.xxx}

    # Extended Server Syntax
    # ======================
    server 'xx.xx.xx.xxx', user: ‘userxxx’, roles: %w{web}

    set :ssh_options, {
      keys: %w(/Users/mikey/.ssh/id_rsa),
      forward_agent: true,
      auth_methods: %w(publickey)
    }

    fetch(:default_env).merge!(wp_env: :production)

    SSHKit.config.command_map[:composer] = "/usr/local/bin/composer"

My output looks like this:

    00:33 deploy:symlink:linked_dirs
          01 mkdir -p /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app
        ✔ 01 myuser@mysite.xxx 0.798s
          02 ln -s /var/www/vhosts/MYSITE.XXX/site_files/shared/web/app/uploads /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads
        ✔ 02 myuser@mysite.xxx 0.821s
    00:37 composer:run
          01 /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader
          01 Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
          01 Your requirements could not be resolved to an installable set of packages.
    (Backtrace restricted to imported tasks)
    cap aborted!
    SSHKit::Runner::ExecuteError: Exception while executing as myuser@mysite.xxx: composer exit status: 2
    composer stdout: Nothing written
    composer stderr: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
    Your requirements could not be resolved to an installable set of packages.


    Caused by:
    SSHKit::Command::Failed: composer exit status: 2
    composer stdout: Nothing written
    composer stderr: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
    Your requirements could not be resolved to an installable set of packages.

    Tasks: TOP => composer:run
    (See full trace by running task with --trace)
    The deploy has failed with an error: Exception while executing as myuser@mysite.xxx: composer exit status: 2
    composer stdout: Nothing written
    composer stderr: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
    Your requirements could not be resolved to an installable set of packages.


    ** DEPLOY FAILED
    ** Refer to log/capistrano.log for details. Here are the last 20 lines:


      INFO [2202bcfe] Finished in 0.842 seconds with exit status 0 (successful).

      INFO [9ffdd9c6] Running /usr/bin/env mkdir -p /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app as myuser@mysite.xxx

     DEBUG [9ffdd9c6] Command: ( export WP_ENV="production" ; /usr/bin/env mkdir -p /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app )

      INFO [7c6e1384] Finished in 0.798 seconds with exit status 0 (successful).

     DEBUG [b463660b] Running [ -L /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads ] as myuser@mysite.xxx

     DEBUG [b463660b] Command: [ -L /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads ]

     DEBUG [344025fc] Finished in 0.800 seconds with exit status 1 (failed).

     DEBUG [834f6b38] Running [ -d /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads ] as myuser@mysite.xxx

     DEBUG [834f6b38] Command: [ -d /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads ]

     DEBUG [2acf63c3] Finished in 0.799 seconds with exit status 1 (failed).

      INFO [784d959d] Running /usr/bin/env ln -s /var/www/vhosts/MYSITE.XXX/site_files/shared/web/app/uploads /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads as myuser@mysite.xxx

     DEBUG [784d959d] Command: ( export WP_ENV="production" ; /usr/bin/env ln -s /var/www/vhosts/MYSITE.XXX/site_files/shared/web/app/uploads /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219/web/app/uploads )

      INFO [bb0cb3f4] Finished in 0.821 seconds with exit status 0 (successful).

     DEBUG [5ef9a522] Running if test ! -d /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219; then echo "Directory does not exist '/var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219'" 1>&2; false; fi as myuser@mysite.xxx

     DEBUG [5ef9a522] Command: if test ! -d /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219; then echo "Directory does not exist '/var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219'" 1>&2; false; fi

     DEBUG [58c14be7] Finished in 0.921 seconds with exit status 0 (successful).

      INFO [a30eb778] Running /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader as myuser@mysite.xxx

     DEBUG [a30eb778] Command: cd /var/www/vhosts/MYSITE.XXX/site_files/releases/20190312073219 && ( export WP_ENV="production" ; /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader )

     DEBUG [777a47fb]   Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

     DEBUG [777a47fb]   Your requirements could not be resolved to an installable set of packages.

This is my Composer.json file

    {
      "name": "roots/bedrock",
      "type": "project",
      "license": "MIT",
      "description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
      "homepage": "https://roots.io/bedrock/",
      "authors": [
        {
          "name": "Scott Walkinshaw",
          "email": "scott.walkinshaw@gmail.com",
          "homepage": "https://github.com/swalkinshaw"
        },
        {
          "name": "Ben Word",
          "email": "ben@benword.com",
          "homepage": "https://github.com/retlehs"
        }
      ],
      "keywords": [
        "bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
      ],
      "support": {
        "issues": "https://github.com/roots/bedrock/issues",
        "forum": "https://discourse.roots.io/category/bedrock"
      },
      "config": {
        "preferred-install": "dist"
      },
      "repositories": [
        {
          "type": "composer",
          "url": "https://wpackagist.org"
        }
      ],
      "require": {
        "php": ">=7.1",
        "composer/installers": "^1.4",
        "vlucas/phpdotenv": "^3.0.0",
        "oscarotero/env": "^1.1.0",
        "roots/wordpress": "5.1",
        "roots/wp-config": "1.0.0",
        "roots/wp-password-bcrypt": "1.0.0",

        "wpackagist-plugin/responsive-lightbox":"2.1.0",
        "wpackagist-plugin/wordpress-seo":"9.7",
        "wpackagist-plugin/featured-video-plus":"2.3.3",
        "wpackagist-plugin/merge-minify-refresh":"1.8.12",
        "wpackagist-plugin/http-https-remover":"2.0",
        "wpackagist-plugin/custom-post-type-ui":"1.6.1",
        "wpackagist-plugin/gigpress":"2.3.23",
        "wpackagist-plugin/instagram-feed":"1.11.3",
        "wpackagist-plugin/comments-from-facebook":"1.9.1",
        "wpackagist-plugin/ninja-forms":"3.4.4",
        "wpackagist-plugin/constant-contact-forms":"1.4.5",
        "wpackagist-plugin/classic-editor":"1.4",
        "wpackagist-plugin/heartbeat-control":"1.2.5",
        "wpackagist-plugin/wp-fastest-cache":"0.8.9.1",
        "wpackagist-plugin/autoptimize":"2.4.4"
      },
      "require-dev": {
        "squizlabs/php_codesniffer": "^3.0.2",
        "roave/security-advisories": "dev-master"
      },
      "extra": {
        "installer-paths": {
          "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
          "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
          "web/app/themes/{$name}/": ["type:wordpress-theme"]
        },
        "wordpress-install-dir": "web/wp"
      },
      "scripts": {
        "post-root-package-install": [
          "php -r \"copy('.env.example', '.env');\""
        ],
        "test": [
          "phpcs"
        ]
      }
    }
1 Like

Try composer upgrade or delete your composer.lock and re-run composer install before deploying.

1 Like

Tried both of those, same error, every time

Anyone else have any idea? I’ve tried upgrading composer, php, everything. STILL nothing.

here is my latest output.

    00:00 git:wrapper
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ
        ✔ 01 sshuser@mysshlocation.xyz 13.503s
          Uploading /var/www/vhosts/MYSITE.XYZ/git-ssh-greggutfeld-production-mikey.sh 100.0%
          02 chmod 700 /var/www/vhosts/MYSITE.XYZ/git-ssh-greggutfeld-production-mikey.sh
        ✔ 02 sshuser@mysshlocation.xyz 2.864s
    00:20 git:check
          01 git ls-remote git@github.com:reccenterhq/greggutfeld.git HEAD
          01 92775418d35d2565f0153236ecd217ce45bd8412 HEAD
        ✔ 01 sshuser@mysshlocation.xyz 4.490s
    00:25 deploy:check:directories
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/shared /var/www/vhosts/MYSITE.XYZ/site_files/releases
        ✔ 01 sshuser@mysshlocation.xyz 2.134s
    00:27 deploy:check:linked_dirs
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/shared/web/app/uploads
        ✔ 01 sshuser@mysshlocation.xyz 1.842s
    00:29 deploy:check:make_linked_dirs
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/shared
        ✔ 01 sshuser@mysshlocation.xyz 2.431s
    00:37 git:clone
          The repository mirror is at /var/www/vhosts/MYSITE.XYZ/site_files/repo
    00:39 git:update
          01 git remote set-url origin git@github.com:reccenterhq/greggutfeld.git
        ✔ 01 sshuser@mysshlocation.xyz 2.176s
          02 git remote update --prune
          02 Fetching origin
        ✔ 02 sshuser@mysshlocation.xyz 3.992s
    00:47 git:create_release
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555
        ✔ 01 sshuser@mysshlocation.xyz 2.456s
          02 git archive master | /usr/bin/env tar -x -f - -C /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555
        ✔ 02 sshuser@mysshlocation.xyz 4.582s
    01:00 deploy:set_current_revision
          01 echo "92775418d35d2565f0153236ecd217ce45bd8412" > REVISION
        ✔ 01 sshuser@mysshlocation.xyz 1.643s
    01:02 deploy:symlink:linked_files
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555
        ✔ 01 sshuser@mysshlocation.xyz 2.481s
          02 ln -s /var/www/vhosts/MYSITE.XYZ/site_files/shared/.env /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/.env
        ✔ 02 sshuser@mysshlocation.xyz 1.819s
    01:10 deploy:symlink:linked_dirs
          01 mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app
        ✔ 01 sshuser@mysshlocation.xyz 2.175s
          02 ln -s /var/www/vhosts/MYSITE.XYZ/site_files/shared/web/app/uploads /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads
        ✔ 02 sshuser@mysshlocation.xyz 1.692s
    01:20 composer:run
          01 php -d memory_limit=512M -d allow_url_fopen=on -d suhosin.executor.include.whitelist=phar /var/www/vhosts/MYSITE.XYZ/site_files/shared/composer.phar install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader
          01 Your requirements could not be resolved to an installable set of packages.
    (Backtrace restricted to imported tasks)
    cap aborted!
    SSHKit::Runner::ExecuteError: Exception while executing as sshuser@mysshlocation.xyz: composer exit status: 2
    composer stdout: Nothing written
    composer stderr: Your requirements could not be resolved to an installable set of packages.


    Caused by:
    SSHKit::Command::Failed: composer exit status: 2
    composer stdout: Nothing written
    composer stderr: Your requirements could not be resolved to an installable set of packages.

    Tasks: TOP => composer:run
    (See full trace by running task with --trace)
    The deploy has failed with an error: Exception while executing as sshuser@mysshlocation.xyz: composer exit status: 2
    composer stdout: Nothing written
    composer stderr: Your requirements could not be resolved to an installable set of packages.


    ** DEPLOY FAILED
    ** Refer to log/capistrano.log for details. Here are the last 20 lines:


     DEBUG [5cf8db81] Command: ( export WP_ENV="production" ; /usr/bin/env ln -s /var/www/vhosts/MYSITE.XYZ/site_files/shared/.env /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/.env )

      INFO [d10b2c33] Finished in 1.819 seconds with exit status 0 (successful).

      INFO [e3bfa8c9] Running /usr/bin/env mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app as sshuser@mysshlocation.xyz

     DEBUG [e3bfa8c9] Command: ( export WP_ENV="production" ; /usr/bin/env mkdir -p /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app )

      INFO [540e8f9c] Finished in 2.175 seconds with exit status 0 (successful).

     DEBUG [9faa1ec7] Running [ -L /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads ] as sshuser@mysshlocation.xyz

     DEBUG [9faa1ec7] Command: [ -L /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads ]

     DEBUG [6c5a7f45] Finished in 1.843 seconds with exit status 1 (failed).

     DEBUG [9468fa10] Running [ -d /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads ] as sshuser@mysshlocation.xyz

     DEBUG [9468fa10] Command: [ -d /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads ]

     DEBUG [2fe50e5a] Finished in 1.660 seconds with exit status 1 (failed).

      INFO [fba98cd7] Running /usr/bin/env ln -s /var/www/vhosts/MYSITE.XYZ/site_files/shared/web/app/uploads /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads as sshuser@mysshlocation.xyz

     DEBUG [fba98cd7] Command: ( export WP_ENV="production" ; /usr/bin/env ln -s /var/www/vhosts/MYSITE.XYZ/site_files/shared/web/app/uploads /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555/web/app/uploads )

      INFO [8654d3db] Finished in 1.692 seconds with exit status 0 (successful).

     DEBUG [0a1acff0] Running if test ! -d /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555; then echo "Directory does not exist '/var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555'" 1>&2; false; fi as sshuser@mysshlocation.xyz

     DEBUG [0a1acff0] Command: if test ! -d /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555; then echo "Directory does not exist '/var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555'" 1>&2; false; fi

     DEBUG [8620679f] Finished in 2.482 seconds with exit status 0 (successful).

      INFO [cbe410b0] Running php -d memory_limit=512M -d allow_url_fopen=on -d suhosin.executor.include.whitelist=phar /var/www/vhosts/MYSITE.XYZ/site_files/shared/composer.phar install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader as sshuser@mysshlocation.xyz

     DEBUG [cbe410b0] Command: cd /var/www/vhosts/MYSITE.XYZ/site_files/releases/20190318031555 && ( export WP_ENV="production" ; php -d memory_limit=512M -d allow_url_fopen=on -d suhosin.executor.include.whitelist=phar /var/www/vhosts/MYSITE.XYZ/site_files/shared/composer.phar install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader )

Does it resolve ok locally? And only fails when you deploy?

Is Media Temple running PHP >7.1?

I think I would go through and change the requirements to "*" one by one and see if you get any joy.

It is. Ive tried it with 5.6, 7, 7.1, 7.2… always the same error no matter what I do

Can you SSH into the server an manually run the command? Not viable as a deployment strategy, obviously, but it might give you some more useful output? Usually when I get the “Your requirements could not be resolved to an install-able set of packages” Composer gives me a list of problematic packages. I admit I’m not familiar w/ Capistrano, but can you customize the Composer command that gets run on the server to run without the --quiet flag? That seems like it might be suppressing useful error output.

I found the best solution. Fuck media temple. We switched to Dreamhost. Problem solved. The issue at MT was that no matter what PHP configs we set, the Plesk DV box kept thinking or returning that it was using php 5.4, their default. Even when we updated the bash profile and in Plesk, set the server to php 5.6, 7.0, 7.1, etc. MT wouldn’t remove php 5 and after days of tech support and no help, I said fuck it.

Have no issues deploying to Dreamhost’s VPS.

Here as the final output from the last time I tried deploying at MT.

    DEBUG [4972721c]  Loading composer repositories with package information

    DEBUG [4972721c]   Installing dependencies from lock file

    DEBUG [4972721c]   Your requirements could not be resolved to an installable set of packages.



    Problem 1

    - This package requires php >=5.6 but your HHVM version does not satisfy that requirement.

    Problem 2

    - roots/wp-config 1.0.0 requires php >=5.6 -> your PHP version (5.4.16) does not satisfy that requirement.

    - roots/wp-config 1.0.0 requires php >=5.6 -> your PHP version (5.4.16) does not satisfy that requirement.

This topic was automatically closed after 42 days. New replies are no longer allowed.