heroku-buildpack-elixir icon indicating copy to clipboard operation
heroku-buildpack-elixir copied to clipboard

libtinfo.so.5 issue with using buildpack

Open callumcieciala opened this issue 3 years ago • 17 comments

Hey,

Sorry if this is the wrong place.

All signs point to this buildpack for deploying elixir to cloudfoundry (KubecCF).

When using the buildpack I get staging failed:

[STG/0] OUT -----> Checking Erlang and Elixir versions [STG/0] OUT cat: /home/vcap/app: Is a directory [STG/0] OUT cat: /home/vcap/bin: Is a directory [STG/0] OUT Will use the following versions: [STG/0] OUT * Stack [STG/0] OUT * Erlang 21.2.5 [STG/0] OUT * Elixir v1.10.2 [STG/0] OUT -----> Stack changed, will rebuild [STG/0] OUT -----> Cleaning all cache to force rebuilds [STG/0] OUT -----> Fetching Erlang 21.2.5 from https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-21.2.5.tar.gz [STG/0] OUT -----> Installing Erlang 21.2.5 (changed) [STG/0] OUT [STG/0] OUT -----> Fetching Elixir v1.10.2 for OTP 21 from https://repo.hex.pm/builds/elixir/v1.10.2-otp-21.zip [STG/0] OUT -----> Installing Elixir v1.10.2 (changed) [STG/0] OUT -----> Installing Hex [STG/0] OUT /app/.platform_tools/erlang/erts-10.2.3/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory [STG/0] OUT 2021/06/24 15:27:39 compile script failed exit status 127 [STG/0] OUT 2021/06/24 15:27:39 failed to create droplet: BuildpackCompileFailed: exit status 223 - internal error: failed to compile droplet: exit status 127

Has anyone seen anything similar? or has any ideas?, this issue is driving me insane.

Thanks!

callumcieciala avatar Jun 24 '21 15:06 callumcieciala

I tried a branch from April just as a what if and I got;

-----> Checking Erlang and Elixir versions Will use the following versions:

  • Stack
  • Erlang 21.2.5
  • Elixir 1.10.2 Will export the following config vars:
  • Config vars DATABASE_URL
  • MIX_ENV=prod -----> Stack changed, will rebuild -----> Cleaning all cache to force rebuilds -----> Fetching Erlang 21.2.5 -----> Installing Erlang 21.2.5 (changed)

-----> Fetching Elixir v1.10.2 -----> Installing Elixir v1.10.2 (changed) [/tmp/buildpack-cache/final/elixir-v1.10.2.zip] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /tmp/buildpack-cache/final/elixir-v1.10.2.zip or /tmp/buildpack-cache/final/elixir-v1.10.2.zip.zip, and cannot find /tmp/buildpack-cache/final/elixir-v1.10.2.zip.ZIP, period. chmod: cannot access '/tmp/app-bits340683100/.platform_tools/elixir/bin/*': No such file or directory -----> Installing Hex -----> Installing rebar /var/lib/buildpacks/8b9035807842a4e4dbe009f3f1478127/lib/elixir_funcs.sh: line 87: mix: command not found /var/lib/buildpacks/8b9035807842a4e4dbe009f3f1478127/lib/elixir_funcs.sh: line 92: mix: command not found -----> Fetching app dependencies with mix /var/lib/buildpacks/8b9035807842a4e4dbe009f3f1478127/lib/app_funcs.sh: line 41: mix: command not found 2021/06/24 16:13:39 compile script failed exit status 1 2021/06/24 16:13:39 failed to create droplet: BuildpackCompileFailed: exit status 223 - internal error: failed to compile droplet: exit status 1 Error staging application: Staging error: failed to create droplet: BuildpackCompileFailed: exit status 223 - internal error: failed to compile droplet: exit status 1 FAILED

callumcieciala avatar Jun 24 '21 16:06 callumcieciala

@callumcieciala, did you figure this out?

NduatiK avatar Jul 28 '21 09:07 NduatiK

@NduatiK nope, I scoured the internet and after chatting to a few people in elixir + cloudfoundry slack channels. Nobody had any ideas with this specific issue, I've moved on to alternative solutions.

callumcieciala avatar Jul 28 '21 10:07 callumcieciala

Thanks I've been trying to deploy elixir on Digital Ocean using Dokku but no luck either. I'll keep at it and give up if a few hours go by.

NduatiK avatar Jul 28 '21 10:07 NduatiK

i still have this problem in sep 2021, may be some internals or local .so files missing at heroku's servers.

ArthurFleischman avatar Sep 29 '21 22:09 ArthurFleischman

Also seeing this on a recent production deploy on Gigalixir.

dustinfarris avatar Oct 12 '21 16:10 dustinfarris

I think this is related to the Ubuntu version. I had success with Ubuntu 18. I can't recall how I set that for Heroku or Gigalixir. Probably an .env file.

I check it out and report back


Edit:

On Heroku, I added a .env file to my project root that specified my target stack.

# .env
STACK="heroku-18"

NduatiK avatar Oct 12 '21 16:10 NduatiK

I expect Ubuntu version is the issue. I just tried upgrading heroku to heroku-22 stack and got this

remote: -----> Checking Erlang and Elixir versions
remote:        Will use the following versions:
remote:        * Stack heroku-22
remote:        * Erlang 22.1.8
remote:        * Elixir v1.13.1 
remote: -----> Stack changed, will rebuild
remote: -----> Fetching Erlang 22.1.8 from https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-22.1.8.tar.gz
remote: -----> Installing Erlang 22.1.8 (changed)
remote: 
remote: -----> Fetching Elixir v1.13.1 for OTP 22 from https://repo.hex.pm/builds/elixir/v1.13.1-otp-22.zip
remote: -----> Installing Elixir v1.13.1 (changed)
remote: -----> Installing Hex
remote: /app/.platform_tools/erlang/erts-10.5.6/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
remote:  !     Push rejected, failed to compile Elixir app.

I don't know the solution

joshcrews avatar Jul 26 '22 17:07 joshcrews

Having the same issue with buildpack

kasvith avatar Aug 04 '22 08:08 kasvith

I used container stack with heroku using a Dockerfile instead

kasvith avatar Aug 04 '22 10:08 kasvith

I inherited an Erlang app (I don't speak Erlang) and solved this problem by updating elixir_buildpack.config:

erlang_version=24.2 elixir_version=1.14.0

and mix.exs:

elixir: "~> 1.14.0",

Luckily, the app still builds. Wish me luck on the push from staging to live.

pbjTEG avatar Sep 06 '22 18:09 pbjTEG