Failed to deploy Laravel project in DigitalOcean App Platform

Hello! I tried to deploy a Laravel project in Digitalocean App Platform but it fails with following error:

  • Installation request for phpseclib/bcmath_compat 1.0.6 -> satisfiable by phpseclib/bcmath_compat[1.0.6]. phpseclib/phpseclib 2.0.30 requires php >=5.3.3 -> satisfiable by php[7.1.33, 7.2.26, 7.2.27, 7.2.28, 7.2.29, 7.2.30, 7.2.31, 7.2.32, 7.2.33, 7.2.34, 7.3.13, 7.3.14, 7.3.15, 7.3.16, 7.3.17, 7.3.18, 7.3.19, 7.3.20, 7.3.21, 7.3.22, 7.3.23, 7.3.24, 7.3.25, 7.3.26, 7.4.10, 7.4.11, 7.4.12, 7.4.13, 7.4.14, 7.4.2, 7.4.3, 7.4.4, 7.4.5, 7.4.6, 7.4.7, 7.4.8, 7.4.9, 8.0.0, 8.0.1].

I see in github project of bcmath_compat ( that in Heroku environment they suggest to execute command:

composer require phpseclib/bcmath_compat:1.0.4

I insert it in build command of Digitalocean App Platform but problem persist. Any suggestion? Thanks!

Show comments

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Cody Baker
DigitalOcean Employee
DigitalOcean Employee badge
January 22, 2021
Accepted Answer

The composer command you reference modifies the composer.json file in your repo. Download composer locally, run the command, and commit the updated composer.json file. Our build process tries to prepare the environment in advance of the build_command. This process includes loading composer dependencies, so it’s likely the error is happening before the build_command is executed.

With regard to composer2: The rollout of composer2 caused some problems with existing applications and was rolled back. We’re currently working on a strategy to rollout the update with impacting existing apps.

D’oh! I’m an idiot, I didn’t think to launch comand locally. Thanks cbaker!

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.