Ubuntu 24.04 安装 libncurses.so.5

用Ubuntu24在编译AOSP时遇到这个问题。

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

看上去是少库文件,然后找到这个deb包的名称下载即可。 不知道为啥Ubuntu22可以直接下载的,Ubuntu24不可以。

参考:https://askubuntu.com/questions/1531398/how-to-install-libncurses-so-5-for-ubuntu-24-04

解决:

# 注意权限,可以先创建,再给写权限
echo "deb http://security.ubuntu.com/ubuntu focal-security main universe" > /etc/apt/sources.list.d/ubuntu-focal-sources.list
sudo apt update
sudo apt install libncurses5
posted @ 2025-11-24 23:00  杨旭0324  阅读(51)  评论(0)    收藏  举报