2

After installing Elrang/OTP on a server with Ubuntu 15.10,

  sudo apt-get install build-essential 
  sudo apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk
  sudo apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk
  wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_18.3-1~ubuntu~wily_amd64.deb
  sudo dpkg -i esl-erlang_18.3-1~ubuntu~wily_amd64.deb
  sudo apt-get update

  sudo apt-get install esl-erlang
  sudo apt-get install elixir

I have an error when running one of my applications:

: error while loading shared libraries: libncursesw.so.6: cannot open shared object file: No such file or directory

UPDATE:

$ locate libncursesw5
/usr/share/doc/libncursesw5
/var/lib/dpkg/info/libncursesw5:amd64.list
/var/lib/dpkg/info/libncursesw5:amd64.md5sums
/var/lib/dpkg/info/libncursesw5:amd64.postinst
/var/lib/dpkg/info/libncursesw5:amd64.postrm
/var/lib/dpkg/info/libncursesw5:amd64.shlibs
/var/lib/dpkg/info/libncursesw5:amd64.symbols


$ 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.postinst
/var/lib/dpkg/info/libncursesw5:amd64.postrm
/var/lib/dpkg/info/libncursesw5:amd64.shlibs
/var/lib/dpkg/info/libncursesw5:amd64.symbols
Oskar K.
  • 295

3 Answers3

4

I think you need to also install the libncursesw5 package:

sudo apt install libncursesw5 libncursesw5-dev

Then try running the command that gave you the "error while loading shared libraries".

Update: If you have these packages and still get the error, it's probably because your software expects version 6 of libncursesw, but only version 5 is available in Ubuntu. (see https://bbs.archlinux.org/viewtopic.php?id=202562 , which is the same problem, but on Arch Linux.)

As a hackish possible workaround, you could create a symlink so your software thinks version 6 is installed, even though it's actually using verison 5:

sudo ln -s /lib/x86_64-linux-gnu/libncursesw.so.5  /lib/x86_64-linux-gnu/libncursesw.so.6

It's not the most elegant solution, but it might work. If you choose to do it, please remember to document it somewhere just in case you run into any problems when upgrading Ubuntu later on.

Please let me know if this was helpful or if you have further questions.

jabbink
  • 103
0

In general for missing *.so.6 shared dependencies the package version should contain 6, not 5 in its name, so in this case (runtime error: libncursesw.so.6: cannot open shared object file) I had to install (in my "distroless" container) the libncursesw6 package:

sudo apt update && sudo apt install -y libncursesw6

mirekphd
  • 133
0

For my particular environment, fixed with:

# Note: add sudo if needed:
ln -fs /lib/x86_64-linux-gnu/libncursesw.so.6 /opt/conda/lib/libncursesw.so.6
Leo Gallucci
  • 336
  • 2
  • 14