idi527

idi527

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

Showing Posts 1 to 7

NobbZ

NobbZ

It seems you are missing libz and ncurses. The other errors seem to be related to the missing libz on a first glance.

idi527

idi527 OP

But they also exist

> locate libncurses
/lib/x86_64-linux-gnu/libncurses.so.5
/lib/x86_64-linux-gnu/libncurses.so.5.9
/lib/x86_64-linux-gnu/libncursesw.so.5
/lib/x86_64-linux-gnu/libncursesw.so.5.9
...
>  locate libncursesw
/lib/x86_64-linux-gnu/libncursesw.so.5
/lib/x86_64-linux-gnu/libncursesw.so.5.9
/usr/share/doc/libncursesw5
/var/lib/dpkg/info/libncursesw5:amd64.list
/var/lib/dpkg/info/libncursesw5:amd64.md5sums
/var/lib/dpkg/info/libncursesw5:amd64.shlibs
/var/lib/dpkg/info/libncursesw5:amd64.symbols
/var/lib/dpkg/info/libncursesw5:amd64.triggers

Also found this https://askubuntu.com/questions/771047/erlang-error-while-loading-shared-libraries-libncursesw-so-6

NobbZ

NobbZ

You need to install ncursesw6.

Also please check for the availability of libz.

idi527

idi527 OP

> find /usr/lib -name libz.so
/usr/lib/x86_64-linux-gnu/libz.so

And I can’t find ncursesw6 with apt.

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.

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.

idi527

idi527 OP

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 …

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
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
kszambelanczyk
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
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
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

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews