Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file

Posted 阿迷创客

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file相关的知识,希望对你有一定的参考价值。

文章目录

1. 前言

在更换Ubuntu22.04之后,按AOSP官方配置,依旧会出现一些编译问题,如下遇到常见的libncurses.so.5: No such file or directory问题.

2. 编译报错

[  0% 1058/140211] bc: libclcore.bc_32 <= frameworks/rs/driver/runtime/rs_sampler.c
FAILED: out/target/product/generic_x86_64/obj_x86/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_sampler.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char -D__i386__ -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_sampler.c -o out/target/product/generic_x86_64/obj_x86/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_sampler.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
02:37:45 ninja failed with: exit status 1

#### failed to build some targets (6 seconds) ####

3. 解决办法

szhou@bc03:~/works/aosp/aosp$ 
szhou@bc03:~/works/aosp/aosp$ sudo dpkg --add-architecture i386  
szhou@bc03:~/works/aosp/aosp$ sudo apt-get update
szhou@bc03:~/works/aosp/aosp$ sudo apt-get install libncurses5:i386 
szhou@bc03:~/works/aosp/aosp$ sudo apt-get install libncurses5-dev  libncurses5

以上是关于Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file的主要内容,如果未能解决你的问题,请参考以下文章

Repo下载AOSP源码:基于ubuntu22.04 环境配置

Repo下载AOSP源码:基于ubuntu22.04 环境配置

Ubuntu22.04 x64 下运行.NET Core3.1程序 报错 usable version of libssl was found

Ubuntu22.04编译安装OpenVINO

ubuntu 22.04源码编译安装boost库

ubuntu 22.04源码编译安装boost库