頭のメモリが少ない

プログラミングと日々の生活

# libncurses.so.5: cannot open shared object file: No such file or directory

libncurses.so.5: cannot open shared object file: No such file or directory

Circle CIでAndroidのビルド環境を構築したときにビルドエラーが起きたのでその時のメモです。

> Building 93% > :android:compileDevelopmentDebugRenderscript:android:compileDevelopmentDebugRenderscript
/usr/local/android-sdk-linux/build-tools/23.0.3/llvm-rs-cc: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

:android:compileDevelopmentDebugRenderscript FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android:compileDevelopmentDebugRenderscript'.
> com.android.ide.common.process.ProcessException: Error while executing '/usr/local/android-sdk-linux/build-tools/23.0.3/llvm-rs-cc' with arguments {-O 3 -I /usr/local/android-sdk-linux/build-tools/23.0.3/renderscript/include/ -I /usr/local/android-sdk-linux/build-tools/23.0.3/renderscript/clang-include/ -p /home/ubuntu/clear_android/android/build/generated/source/rs/development/debug -o /home/ubuntu/clear_android/android/build/generated/res/rs/development/debug/raw -target-api 14 /home/ubuntu/clear_android/android/src/main/rs/Sharpen.rs /home/ubuntu/clear_android/android/src/main/rs/TopHatTransform.rs}

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 41.333 secs

sshで覗いてみてもファイルは存在するんですが、どうやら32bitの方のパッケージをインストールせんと駄目みたいです。

対応策

dependencies:
  pre:
    - sudo apt-get install lib32ncurses5

参考

adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
http://stackoverflow.com/questions/17092093/adb-error-while-loading-shared-libraries-libncurses-so-5-cannot-open-shared-o