Skip to content Skip to sidebar Skip to footer

Cant Make Opencv Work On Heroku

I'm trying to make opencv work on Heroku but i have the following error on the server's log file : 2017-10-05T23:17:08.145096+00:00 heroku[web.1]: State changed from crashed to sta

Solution 1:

It was a dependency problem, what i needed is to install this:

apt-get install libsm6 libxrender1 libfontconfig1

Ps: Heroku's Free account doesn't include ssh connexion so i switched to Google Cloud Platfom and it works.


Solution 2:

You have to install some dependencies, as Heroku will not automatically do it for you.

  1. Add an Aptfile in your project directory and add the below file
  • libsm6

  • libxrender1

  • libfontconfig1

  • libice6

    NOTE: Aptfile should not have any .txt or any other extension. Just like the Procfile

  1. Push the edited code to Github

  2. In heroku dashboard,
    goto your-app --> settings --> buildpacks --> add buildpacks --> https://github.com/heroku/heroku-buildpack-apt.git
    copy and paste this link --> add buildpack

  3. Deploy your app

buildpack adding


Post a Comment for "Cant Make Opencv Work On Heroku"