idi527

idi527

Ubuntu exec: .../erlexec: not found

I’ve built a release in docker with the help of :mix_docker, then copied the tarfile to the server running ubuntu 16.04, and then tried to bin/backend start the app (which is called “backend”). And I got this

> bin/backend start
/home/idiot/backend/erts-9.1.3/bin/erl: 13: exec: /home/idiot/backend/erts-9.1.3/bin/erlexec: not found

although the file is there

> file /home/idiot/backend/erts-9.1.3/bin/erlexec
/home/idiot/backend/erts-9.1.3/bin/erlexec: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, not stripped

I wonder what the problem is.

Am I missing the interpreter? No, it seems to exist.

> /lib/ld-musl-x86_64.so.1
musl libc
Version 1.1.9
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname [args]

I’ve changed the shell to be used for erts-9.1.3/bin/erl to bash:

- #!/bin/sh
+ #!/bin/bash
set -e

SCRIPT_DIR=`dirname $0`
ROOTDIR=`cd $SCRIPT_DIR/../../ && pwd`
BINDIR=$ROOTDIR/erts-9.1.3/bin
EMU=beam
PROGNAME=`echo $0 | sed 's/.*\\///'`
export EMU
export ROOTDIR
export BINDIR
export PROGNAME
exec "$BINDIR/erlexec" ${1+"$@"}

and got this

> bin/backend start

Error loading shared library libz.so.1: No such file or directory (needed by /home/idiot/backend/erts-9.1.3/bin/beam.smp)
Error loading shared library libncursesw.so.6: No such file or directory (needed by /home/idiot/backend/erts-9.1.3/bin/beam.smp)
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflate: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflate: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: tputs: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: crc32: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: crc32_combine: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflateReset: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: tgetflag: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: tgetent: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflateInit2_: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: tgetnum: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflateParams: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: adler32_combine: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflateInit_: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflateEnd: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflateSetDictionary: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: adler32: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflateGetDictionary: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflateEnd: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: pthread_setname_np: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflateInit_: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflateInit2_: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: tgetstr: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: inflateReset: symbol not found
Error relocating /home/idiot/backend/erts-9.1.3/bin/beam.smp: deflateSetDictionary: symbol not found

Marked As Solved

NobbZ

NobbZ

Then you need to build your release on a system that has ncursesw5.

Also you’ll probably need to build it on a system that uses glibc instead of libmusl.

Do not build releases on different OS than you want to run them.

Also Liked

bitwalker

bitwalker

Leader

The issue here is that the release was built in Alpine and is being deployed to Ubuntu, and includes ERTS - that won’t work. You need to either not include ERTS, or build in an Ubuntu container/VM/etc. I would recommend the latter, since if you have NIFs, they may also be sensitive to the difference. Hopefully in the future we’ll have a way to build “linux generic” releases, but that is not the case today.

Where Next?

Popular in Questions Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New

We're in Beta

About us Mission Statement