Home » Android » Android Errors and Solutions » Fixed: clang++: error while loading shared libraries: libtinfo.so.5

Fixed: clang++: error while loading shared libraries: libtinfo.so.5

We got the following error while compiling Android AOSP source code on Ubuntu PC,

clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Solution :

This error is occurring the Ubuntu Host PC didn’t had libtinfo5 installed on it. The libtinfo5 can be installed when we install libncurses5 hence this can resolved by installing libncurses5 using below command,

$ sudo apt-get install libncurses5

Now, when you enter above command and start installation, you can see the messages as below,

$ sudo apt-get install libncurses5
Reading package lists... Done
Building dependency tree
Reading state information... Done

The following additional packages will be installed:
The following NEW packages will be installed:
  libncurses5 libtinfo5
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 180 kB of archives.
After this operation, 864 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libtinfo5 amd64 6.2-0ubuntu2 [83.0 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libncurses5 amd64 6.2-0ubuntu2 [96.9 kB]
Fetched 180 kB in 1s (147 kB/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database ... 199442 files and directories currently installed.)
Preparing to unpack .../libtinfo5_6.2-0ubuntu2_amd64.deb ...
Unpacking libtinfo5:amd64 (6.2-0ubuntu2) ...
Selecting previously unselected package libncurses5:amd64.
Preparing to unpack .../libncurses5_6.2-0ubuntu2_amd64.deb ...
Unpacking libncurses5:amd64 (6.2-0ubuntu2) ...
Setting up libtinfo5:amd64 (6.2-0ubuntu2) ...
Setting up libncurses5:amd64 (6.2-0ubuntu2) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment