Fl4m3Ph03n1x
Background
I am using elixir 1.9 with erlang 22.0 and I am using the command mix release. However when I try to run my app with _build/dev/rel/andy/bin/my_app start start I get an error:
Error
This is the error I get when trying to run it:
/home/devops/_build/dev/rel/my_app/erts-10.4.3/bin/beam.smp: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
To fix it I tried running sudo apt-get install libtinfo.so.6 but it doesn’t look like it exists:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libtinfo.so.6
E: Couldn't find any package by glob 'libtinfo.so.6'
E: Couldn't find any package by regex 'libtinfo.so.6'
This is my OS operation:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
How can I fix this?
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
You probably build your release on a different setup, one which had
libtinfo.so.6available.Please build the release on an Ubuntu 16.04.6 and nothing else.
edit
For 16.04 only
libtinfo5is available as it seems.It contains the following files (Ubuntu – Error):
/lib/x86_64-linux-gnu/libtinfo.so.5/lib/x86_64-linux-gnu/libtinfo.so.5.9/usr/lib/x86_64-linux-gnu/libtic.so.5/usr/lib/x86_64-linux-gnu/libtic.so.5.9/usr/share/doc/libtinfo5/TODO.Debian/usr/share/doc/libtinfo5/changelog.Debian.gz/usr/share/doc/libtinfo5/copyrightbaruch
I have the same error when trying to run an app that I built in Docker on the Elixir 1.9.1 image, my Dockerfile is:
NobbZ
Do you see that error when you start or when you build that docker, or are you extracting the built release and run it elsewhere?
baruch
I believe this error was due to my copying build/release artifacts into my image. I added
_buildto.dockerignoreand now the app starts.To answer your question, the crash occurred whether running in the same container as the build or copying the release to a fresh one.
NobbZ
Yeah,
_buildanddepsfrom your host should never slip into the container, or vice versa…Also there are some other culprits with your dockerfile. Even the final stage still contains all the temporary artifacts and source code. This increases the size of the resulting image unnecessarily. You should try to properly use the multi-stage you already started with.
baruch
Yup, thank you. I got it working with the following Dockerfile:
and .dockerignore:
Still needs a bit of work, in particular to allow prod builds, but its a start.
(I take your point about not copying in the deps, but that is giving me issues with a timeout from hex.pm when fetching tzdata.)
NobbZ
Please also add
depsto your.dockerignoe. Some packages create artifacts in thereAlso, I can’t see where you define
base, but you reference it. Just from looking at it, this wont actually work.baruch
Thanks. I will add
deps, good to know how important that is.The
baseimage is stored in my internal repository, and is just Ubuntu with a couple of basic changes.flp
Just as addition here: I got this error because the build was running on Ubuntu 18.10 but my prod is running on Ubuntu 18.04. So I migrated my pipeline back to 18.04 and everything is fine again
Manzanit0
Just for the record, I came across this yesterday, same issue, etc. and this is the final working Dockerfile I came up with, in case anybody finds it useful.