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.

Last Post!

idi527

idi527

Yeah, I though for some reason that any linux distro would do. Before that I was using a freebsd (building the release with vagrant), but decided to try building with docker for linux …

Where Next?

Popular in Questions Top

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
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
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
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49084 226
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42533 114
New

We're in Beta

About us Mission Statement