linuxherokuexecutablesudo

How can I install libstdc++6 for my app on Heroku?


I'm trying to run a Python app on Heroku which spawns a Linux executable.

I get the error:

/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found

All solutions to this problem I have found use sudo.

If I open a bash terminal with heroku CLI

heroku run bash

and type

sudo

I get

bash: sudo: command not found

So I cannot run

sudo apt-get install libstdc++6

Solution

  • I got it.

    Upgraded Heroku app to latest stack ( heroku-18 instead of default heroku-16 ) using Heroku CLI

    heroku stack:set heroku-18 -a <app name>
    

    Then I had to make a git push so that the app is rebuilt with new stack.

    Now it works.

    Yes, heroku-18 is beta, but as long as it works, I don't mind.