Erlang error: while loading shared libraries: libncursesw.so.6
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.
Related videos on Youtube
Oskar K.
Updated on September 18, 2022Comments
-
Oskar K. over 1 year
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. almost 8 yearsE: Unable to locate package linbcursesw5
-
Admin almost 8 yearsPlease double-check the spelling of
libncursesw5
and try again. -
Oskar K. almost 8 yearslibncursesw5 is already the newest version.
-
Admin almost 8 yearsand
libncursesw5-dev
as well? -
Oskar K. almost 8 years................yes.
-
Admin almost 8 yearsI don't know of any elegant solution, but I've updated my answer with a possible workaround.
-
Oskar K. almost 8 yearsbut neither /usr/lib/libncursesw.so.5 no /usr/lib/libncursesw.so.6 exist at my server.
-
Admin almost 8 yearsMy mistake! I've updated the paths in my answer.
-
Oskar K. almost 8 yearsshould it be /lib/x86_64-linux-gnu/libncursesw.so.5 or /lib/x86_64-linux-gnu/libncursesw.so.5.9 ?
-
Vik about 5 yearsThe hackish symlink solution worked for me. Was having this issue when installing cava (github.com/karlstav/cava).