I’ve installed Android Studio and tried to run my first project in it, and I’ve got following error:
Error Output was: /home/user/android-studio/sdk/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
I’ve already tried to run
sudo ldconfig
but it doesnt help. I’ve recently installed libncurses (before using android studio).
What should I do?
asked Jun 9, 2013 at 1:51
If libncurses is not installed then install it and try again.
for 32-bit binaries : sudo apt-get install libncurses5:i386
for 64-bit binaries :
sudo apt-get install libncurses5
Also install the collection of libraries by using this command,
sudo apt-get install ia32-libs
answered Jul 23, 2013 at 4:48
HibernatedGuyHibernatedGuy
1,7792 gold badges11 silver badges15 bronze badges
7
error while loading shared libraries: libncurses.so.5
If you see this, your distro probably has a newer version of libncurse installed. First find out what version of libncurses your distro has:
$ ls -1 /usr/lib/libncurses*
/usr/lib/libncurses.so
/usr/lib/libncurses++.so
/usr/lib/libncurses++w.so
/usr/lib/libncursesw.so
/usr/lib/libncurses++w.so.6
/usr/lib/libncursesw.so.6
/usr/lib/libncurses++w.so.6.0
/usr/lib/libncursesw.so.6.0
In this case, we are dealing with version 6, so we make two symlinks:
$ sudo ln -s /usr/lib/libncursesw.so.6.0 /usr/lib/libncurses.so.5
$ sudo ln -s /usr/lib/libncursesw.so.6.0 /usr/lib/libtinfo.so.5
After this, the program should run normally.
answered Mar 9, 2017 at 4:32
4
If you are absolutely sure that libncurses, aka ncurses, is installed, as in you’ve done a successful ‘ls’ of the library, then perhaps you are running a 64 bit Linux operating system and only have the 64 bit libncurses installed, when the program that is running (adb) is 32 bit.
If so, a 32 bit program can’t link to a 64 bit library (and won’t locate it anyway), so you might have to install libcurses, or ncurses (32 bit version). Likewise, if you are running a 64 bit adb, perhaps your ncurses is 32 bit (a possible but less likely scenario).
answered Jun 9, 2013 at 1:57
Edwin BuckEdwin Buck
68.6k7 gold badges99 silver badges133 bronze badges
7
On Arch Linux you can install ncurses5-compat-libs
AUR package.
FYI it is mentioned in Arch Wiki android page, just in case if you’ll need some other dependencies for Android Studio: https://wiki.archlinux.org/index.php/Android
answered May 21, 2019 at 0:10
MixazMixaz
4,0581 gold badge28 silver badges55 bronze badges
For Redhat Linux 8 try this:
sudo yum install libncurses*
answered May 16, 2019 at 22:08
Pritam BanerjeePritam Banerjee
17.4k10 gold badges88 silver badges105 bronze badges
1
In Fedora 28 use:
sudo dnf install ncurses-compat-libs
Suraj Rao
29.3k11 gold badges96 silver badges103 bronze badges
answered May 8, 2018 at 9:29
1
I solved the issue using
ln -s libncursesw.so.5 /lib/x86_64-linux-gnu/libncursesw.so.6
on ubunutu 18.10
answered Oct 29, 2018 at 9:02
SLuckSLuck
5113 silver badges14 bronze badges
1
For Redhat Linux this helped,
sudo yum install ncurses-compat-libs
answered May 16, 2021 at 20:45
Tom TaylorTom Taylor
3,1772 gold badges36 silver badges59 bronze badges
On Arch, i fix like this:
sudo ln -s /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.6
Suraj Rao
29.3k11 gold badges96 silver badges103 bronze badges
answered Nov 21, 2017 at 13:31
To install ncurses-compat-libs
on Fedora 24 helped me on this issue
(unable to start adb error while loading shared libraries: libncurses.so.5
)
answered Jan 25, 2017 at 16:21
Your system likely does not provide the ncurses library at the version android studio uses. My arch linux install only had ncurses 6 but android studio needs version 5.
You could check if your distribution has a compatability package, or use the solution that Rahmat Aligos suggested.
answered Apr 17, 2017 at 17:03
areiserareiser
5311 gold badge5 silver badges17 bronze badges
2
Mixaz’s above answer worked for me. However I had issues installing the package because of PGP check failures. Installing it by skipping the signature worked, you could try this :
yaourt --m-arg "--skipchecksums --skippgpcheck" -Sb <your-package>
answered Nov 16, 2019 at 22:31
I tried to debug a C application with Eclipse using GDB but I got the following error:
Error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
I tried to install libncurses5
but it’s already installed.
Should I change the location of this package? any idea?
This is what I got after running locate libncurses
.
# locate libncurses
/home/sina/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,any,any,any,libncurses5-dbg,page,1,helpful,,187a06d92ba0b73dd50444293b7cab16
/home/sina/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,quantal,any,libncurses5-dbg,page,1,helpful,,e8f56bcf979e4c966af1cf8fcfb46b89
/home/sina/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,raring,any,libncurses5-dbg,page,1,helpful,,9e8b7962287c629e99b01502879a8f35
/home/sina/Downloads/libncurses5-dbg_5.9+20130608-1ubuntu1_i386.deb
/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
/usr/lib/libncurses++_g.a
/usr/lib/libncurses_g.a
/usr/lib/debug/libncurses.so.5
/usr/lib/debug/libncurses.so.5.9
/usr/lib/debug/lib/x86_64-linux-gnu/libncurses.so.5.9
/usr/lib/debug/lib32/libncurses.so.5.9
/usr/lib/debug/lib32/libncursesw.so.5.9
/usr/lib/debug/usr/libx32/libncurses.so.5.9
/usr/lib/debug/usr/libx32/libncursesw.so.5.9
/usr/lib/x86_64-linux-gnu/libncurses++.a
/usr/lib/x86_64-linux-gnu/libncurses.a
/usr/lib/x86_64-linux-gnu/libncurses.so
/usr/share/doc/libncurses5
/usr/share/doc/libncurses5-dbg
/usr/share/doc/libncurses5-dev
/usr/share/doc/libncursesw5
/var/cache/apt/archives/libncurses5-dbg_5.9-10ubuntu4_amd64.deb
/var/lib/dpkg/info/libncurses5-dbg.list
/var/lib/dpkg/info/libncurses5-dbg.md5sums
/var/lib/dpkg/info/libncurses5-dbg.postinst
/var/lib/dpkg/info/libncurses5-dev.list
/var/lib/dpkg/info/libncurses5-dev.md5sums
/var/lib/dpkg/info/libncurses5-dev.postinst
/var/lib/dpkg/info/libncurses5:amd64.list
/var/lib/dpkg/info/libncurses5:amd64.md5sums
/var/lib/dpkg/info/libncurses5:amd64.postinst
/var/lib/dpkg/info/libncurses5:amd64.postrm
/var/lib/dpkg/info/libncurses5:amd64.shlibs
/var/lib/dpkg/info/libncurses5:amd64.symbols
/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
Problem
Upon installation completion, several errors in the form of, error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory, occur when trying start IBM Rational ClearCase on RedHat Linux.
Symptom
After installation of Rational ClearCase in 64-bit RedHat Linux, the following series of errors occur when attempting to start:
/opt/rational/ClearCase/etc/ClearCase start >/var/tmp/ATRIA.run_cmd_output 2>&1
List the contents of ATRIA.run_cmd_output:
—-
ClearCase daemons:
/opt/rational/clearcase/etc/albd_server: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Albd server startup error(4:127)
albd_server lockmgr -q 1024 -u 256 -f 256
/opt/rational/clearcase/etc/mount_mvfs: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Trouble mounting the viewroot «/view»(16:127)
/opt/rational/clearcase/etc/mvfslog: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Trouble setting MVFS kernel log file to /var/adm/rational/clearcase/log/mvfs_log(2:127)
Mounting public VOBs…
/opt/rational/clearcase/bin/cleartool: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Trouble mounting public VOBs(32:127)
Cause
This is happening even though the 64-bit libncurses.so.5 libraries are actually installed. However, ClearCase actually requires the 32-bit libncurses.so.5 libraries to be installed.
Investigate the following group packages and contact Red Hat for further information concerning 32-bit libraries included within the following package groups:
«Legacy Software Support»
«Legacy Software Development»
Also refer to «man yum» and the section for «groupinstall» for more information on how to install package groups.
Resolving The Problem
Install the 32-bit libraries from Red Hat and ClearCase will no longer return errors during start up of the application.
Related Information
[{«Product»:{«code»:»SSSH27″,»label»:»Rational ClearCase»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Installation»,»Platform»:[{«code»:»PF016″,»label»:»Linux»}],»Version»:»2003.06.00;7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8;7.0.1;7.0.1.1;7.0.1.2;7.0.1.3;7.0.1.4;7.0.1.5;7.0.1.6;7.0.1.7;7.1;7.1.0.1;7.1.0.2″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
mdaffin opened this issue
Sep 21, 2015
· 14 comments
Assignees
Comments
Archlinux is now using ncurses6 which is causing the following error in platformio while trying to upload to the arduino platform:
avrdude: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
The archlinux version of avrdude works with the quick workaround:
rm ~/.platformio/packages/tool-avrdude/avrdude ln -s /usr/bin/avrdude ~/.platformio/packages/tool-avrdude/avrdude
However, the tools that platformio downloads should come with the dependencies that they require to run or alternatively make use of the system tools when they are available.
Could you try to install lib32-ncurses
package?
No difference, it is version 6, when then downloaded version is looking for
version 5.
On Tue, 22 Sep 2015 08:39 Ivan Kravets notifications@github.com wrote:
Could you try to install lib32-ncurses package?
—
Reply to this email directly or view it on GitHub
#291 (comment)
.
Hi @James147
Do you have the same issue when you upload sketch through Arduino IDE?
Not with the one in the Arch User Repo, but it appears to replace the arduino provided avrdude with the working system one:
# fix avrdude rm -f "${pkgdir}/usr/share/arduino/hardware/tools/avr/bin/avrdude"{,_bin} ln -s /usr/bin/avrdude "${pkgdir}/usr/share/arduino/hardware/tools/avr/bin/avrdude"
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=arduino
So I assume that the official arduino build of avrdude does have the same problem.
@James147 I’ve just added to FAQ page info about the solution for this issue. If we recompile avrdude
with the latest libncurses.so.6
, it will not work with the rest Linux distributives (Debian, Ubuntu, etc.).
The idea with symbolic link is normal temporary solution.
I had to replace the avrdude
installed by platformio with the system one, so
AVRDUDE=~/.platformio/packages/tool-avrdude/avrdude rm $AVRDUDE ln -s /usr/bin/avrdude $AVRDUDE
Thanks @cqql your solution works like a charm for me.
@ivankravets Thats the reason why linux distributions have a package manager. Either you ship the binary AND its dependencies or you let package manager do its work. Everything between is just a mess. So the obvious solution would be not to ship binaries at all!
In addition to what @mdaffin posted in the first comment, I had to link the avrdude
of the toolchain-atmelavr
to the new avrdude
also, so I had to add these commands :
rm ~/.platformio/packages/toolchain-atmelavr/bin/avrdude
ln -s ~/.platformio/packages/tool-avrdude/avrdude ~/.platformio/packages/toolchain-atmelavr/bin/avrdude
Confirming that @Hamza5 ‘s addition did it for me. I ended up symlinking both locations, but it only worked upon the second (in toolchain-atmelavr
as well as tool-avrdude
.
I’m trying platformio on gentoo. Most ‘packages’ are broken in the same way:
piogdb: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
or
% ldd .platformio//packages/toolchain-gd32v/bin/riscv-nuclei-elf-gdb
linux-vdso.so.1 (0x00007ffe46d73000)
libncursesw.so.5 => not found
libtinfo.so.5 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007f67db6b4000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f67db676000)
libmpfr.so.6 => /usr/lib64/libmpfr.so.6 (0x00007f67db5f6000)
libm.so.6 => /lib64/libm.so.6 (0x00007f67db4b5000)
libc.so.6 => /lib64/libc.so.6 (0x00007f67db2dc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f67dbfb0000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f67db261000)
So that issue is part of the PIO FAQ… I can’t really see a proper solution here. The AUR package is gone, the symlinks look like crude hacks…
By downloading the ncurses5-compat-libs & lib32-ncurses5-compat-libs from AUR, this issue was solved for me.
Should work on other distros by downloading these same packages from their specific package managers.
I use Debian and I have a problem with executing arm-none-eabi-gdb
as a user. I get the following message: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
. The only way to run it is to type sudo arm-none-eabi-gdb
. I have checked library libncurses.so.5 and found that there was no execute permission for users so I changed it with chmod
. Now all users can execute it but I still get the error when calling arm-none-eabi-gdb
without sudo.
Can anyone explain me what is the mechanism that is blocking me ?
Thomas Dickey
73.1k9 gold badges166 silver badges261 bronze badges
asked Jul 6, 2015 at 13:41
It seems to be a permission problem. That would explain why with sudo
(i.e. working as «root») has no problems finding and using the shared library but your normal user cannot.
I assume that you have a symbolic link from libncurses.so.5
to the actual version used in the system. The result of ls -l
of that would be very helpful to know where the link points and its mode (permission), also check the permissions of the path.
Symbolic links on libraries work fine, as long as the final target they trace to exists and is accessible.
answered Jul 6, 2015 at 14:06
dave_alcarindave_alcarin
6641 gold badge4 silver badges13 bronze badges
3
Issue solved. It occurred that arm-none-eabi-gdb
command was executing gdb program located in different directory than sudo arm-none-eabi-gdb
(surprisingly I had 2 arm-none-eabi-gdbs). strace
helped me to solve the puzzle.
answered Jul 21, 2015 at 11:16
Al BundyAl Bundy
1622 silver badges12 bronze badges
-
jujufly
- Posts: 9
- Joined: 2017/02/04 20:32:34
error while loading shared libraries: libncurses.so.5: cannot open shared object file:
I encounter the following error on centos 7,
error while loading shared libraries: libncurses.so.5: cannot open shared object file:
anybody has suggestion? thank you.
-
TrevorH
- Site Admin
- Posts: 32527
- Joined: 2009/09/24 10:40:56
- Location: Brighton, UK
Re: error while loading shared libraries: libncurses.so.5: cannot open shared object file:
Post
by TrevorH » 2017/04/16 12:54:37
Is that the entire error message or is there more info? The file libncurses.so.5 is supplied by the ncurses-libs package so you will need that installed. If yum install ncurses-libs says that it’s already installed then try rpm -V ncurses-libs to check that all files the package is supposed to own are correctly installed — any output is likely to be an error. If rpm -V says the file is missing then yum reinstall ncurses-libs should fix it. If it says nothing then all is OK and the next possibility is that you are trying to run a 32 bit program and the 32 bit version of the package is missing. Repeat the above commands for ncurses-libs.i686 and make sure that is installed in that case.
-
mawais1
- Posts: 2
- Joined: 2017/02/12 03:13:13
Re: error while loading shared libraries: libncurses.so.5: cannot open shared object file:
Post
by mawais1 » 2017/04/16 18:00:43
this helped me fix the libncurses issue .. see, if this helps you out as well .. thanks..
yum install ncurses-devel
-
jujufly
- Posts: 9
- Joined: 2017/02/04 20:32:34
Re: error while loading shared libraries: libncurses.so.5: cannot open shared object file:
Post
by jujufly » 2017/04/16 21:01:19
TrevorH wrote:Is that the entire error message or is there more info? The file libncurses.so.5 is supplied by the ncurses-libs package so you will need that installed. If yum install ncurses-libs says that it’s already installed then try rpm -V ncurses-libs to check that all files the package is supposed to own are correctly installed — any output is likely to be an error. If rpm -V says the file is missing then yum reinstall ncurses-libs should fix it. If it says nothing then all is OK and the next possibility is that you are trying to run a 32 bit program and the 32 bit version of the package is missing. Repeat the above commands for ncurses-libs.i686 and make sure that is installed in that case.
you are right, i am running 32 bit program, it works when switching to 64 bit program. thanks.