Roots Discourse

"Your requirements could not be resolved..." with no problems listed

Hello,

First post here, I found Bedrock by accident but it’s so great that I want to stick to it, however…

I realized I want to use bedrock-capistrano, setting it up from the start wasn’t anything easy, but I managed to get far anyway. I am on a shared host, with git repo and deploy target directory on that server. Server has PHP 7.3.0, and locally I have 7.3.7 (btw. does it make any difference?). Bedrock-Capistrano 3.11.0.

I setup bedrock-capistrano stuff locally, and I have run “bundle exec cap staging deploy:check” with success. However the problem is “bundle exec cap staging deploy” - it gives me an error “Your requirements could not be resolved to an installable set of packages.” without the list of problems, so I actually am not able to see what is causing this… Is this a local problem? Is this on the server? I have no idea…

Here’s the output after the error: https://pastebin.com/y4XgRSXP
My composer.json file: https://pastebin.com/jwDqkTYh
And composer.lock: https://pastebin.com/mc5DAqzt

The best part is that the operation that fails is:
/usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader
…and I am able to run this command directly on the server with no errors… so this might suggest something is wrong locally. But is it?

Please help with at least a tiny hint. :tired_face:

PS. Just a note that the deploy command is run with “–trace” option, and the logging is set to “debug”.

Have you looked through this thread? No matter what I do, I keep getting "Your requirements could not be resolved to an installable set of packages" The problem seems similar to yours.

Thanks @alwaysblank, I have seen that thread before - there at least the guy is able to see the problems listed (which was related to PHP version not up to date). I already had a similar problem and had to switch to PHP 7 on the server.

I’ve also tried running composer upgrade + install, as well as removing the .lock file and running install again, as advised.

I noticed that deploy command has another failed command before the one about requirements:

DEBUG[dff30e28] Running /usr/bin/env [ -f /home/MYUSER/MYFOLDER/current/REVISION ] on MYHOST
DEBUG[dff30e28] Command: [ -f /home/MYUSER/MYFOLDER/current/REVISION ]
DEBUG[dff30e28] Finished in 0.040 seconds with exit status 1 (failed).

I don’t know why it fails here, as there are is no other info provided.

PS. One more thing, in staging.rb config in the server settings, the user is the one I use for SSH-ing to the server, which means I have no “deploy” user setup. Could this be a related problem? It seems not as it’s clearly a composer-related one, but asking just in case…

Ok, I figured this out…

Earlier, I had a different problem with PHP version in my remote shell, it was still very old (5.5.37) - I have asked my hosting provider support how to fix it (.bash_profile entry) and it worked, I was now on 7.3.9. Supposedly. I kinda moved on with capistrano, but then hit the wall I described above.

Today I thought - how about checking PHP version remotely, which would kinda tell me how my failing deployment command sees it? …and so I did with $ ssh me@myserver.com php -v
Guess what? :wink: it’s still 5.5.37! I just wrote to tech support, and hopefully they’ll fix it for me (it’s a small local provider).

The idea came to be when reading the thread @alwaysblank mentioned, I’ve read it multiple times, tried suggestions, but never thought about checking PHP remotely. I guess that can be a helpful tip.

EDIT: they initially refused to change this as it’s a shared hosting, but after couple of hours they changed their mind, and at least “my” server is now on 7.3.9, and deployment works well! :wink:

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