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

文章目录

    • 1. 前言
    • 2. 编译报错
    • 3. 解决办法

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

你可能感兴趣的:(安卓程序员日记,android,AOSP)