Reputation: 1039
I'm building a substratum theme from https://github.com/substratum/template
I'm getting the following errors on run:
Build command failed.
Error while executing process /home/anubhav/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/anubhav/AndroidStudioProjects/template/app/src/main/jni/Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-24 NDK_OUT=/home/anubhav/AndroidStudioProjects/template/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/anubhav/AndroidStudioProjects/template/app/build/intermediates/ndkBuild/debug/lib /home/anubhav/AndroidStudioProjects/template/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libLoadingProcess.so}
[armeabi-v7a] Compile thumb : LoadingProcess <= LoadingProcess.c
/home/anubhav/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
make: *** [/home/anubhav/AndroidStudioProjects/template/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/LoadingProcess/LoadingProcess.o] Error 127
I'm running Android Studio 3.0.1 on Manjaro. I really don’t know what else info to provide, so please mention if anything is required.
Upvotes: 67
Views: 109925
Reputation: 21
TLDR:
Edit /etc/apt/sources.list.d/ubuntu.sources
Add these lines to the bottom (Don't know if this is 100% correct)
Types: deb
URIs: HTTP://archive.ubuntu.com/ubuntu/
Suites: lunar
Components: universe
sudo apt update
sudo apt-get install libtinfo5
But this package would not install
sudo apt install libncurses5
And neither would linking work because a specific function within libtinfo.so.5
ln -s /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.5
I found this article for a completely different problem https://askubuntu.com/questions/1491254/installing-cuda-on-ubuntu-23-10-libt5info-not-installable
Which suggested this process
Open a terminal window and run:
sudo nano /etc/apt/sources.list
Add this line (adds the Ubuntu 23.04 aka "Lunar Lobster" universe repository to apt):
deb http://archive.ubuntu.com/ubuntu/ lunar universe
Save and exit, then run:
sudo apt update
But, /etc/apt/sources.list is outdated
Go to /etc/apt/sources.list.d/ubuntu.sources instead
I then added this to the file
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: lunar
Components: universe
Then I apt update try to install libtinfo5 directly and it worked
sudo apt-get install libtinfo5
Upvotes: 2
Reputation: 1438
I had the same problem on Debian Buster. Installing the Debian package libncurses5 solved it for me:
$ sudo apt install libncurses5
Upvotes: 134
Reputation: 10509
libtinfo is not an Android API. You need to build that library for Android and include it in your APK.
Upvotes: 0