ARM64架构Ubuntu22.04(树莓派4)缺失32位libncurses.so.5求助
解决树莓派4 Ubuntu22.04 ARM64下Box86/Wine缺失32位ARM版libncurses.so.5的问题
问题背景
在树莓派4的64位Ubuntu22.04系统中,使用Box86和Wine运行32位应用时,提示缺失libncurses.so.5库。尝试安装libncurses5:i386和ia32-libs均失败——这两个包是x86架构专属,而树莓派为ARM架构,实际需要的是ARM 32位(armhf)版本的库。
报错信息
apt安装失败提示
krzysztof@krzysiaczekpi1:~$ sudo apt-get install libncurses5:i386 [sudo] password for krzysztof: Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package libncurses5:i386
sudo apt-get install ia32-libs Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package ia32-libs
Box86/Wine运行报错
Box86 with Dynarec v0.2.7 e9fcef3d built on Aug 21 2022 00:07:30 Box86 with Dynarec v0.2.7 e9fcef3d built on Aug 21 2022 00:07:30 Error initializing native libncurses.so.5 (last dlerror is libncurses.so.5: cannot open shared object file: No such file or directory) Wine cannot find the ncurses library (libncurses.so.5).
解决步骤
1. 启用ARM 32位(armhf)架构支持
Ubuntu22.04 ARM64默认未开启armhf架构,先添加并更新源:sudo dpkg --add-architecture armhf sudo apt update2. 安装ARM 32位版libncurses5
现在可以安装适配ARM架构的32位库:sudo apt install libncurses5:armhf3. 建立软链接(可选,若仍提示找不到)
如果Box86/Wine仍无法识别库,可将库链接到通用搜索路径:# 先确认库的安装路径 ls /usr/lib/arm-linux-gnueabihf/libncurses.so.5 # 若存在,创建软链接 sudo ln -s /usr/lib/arm-linux-gnueabihf/libncurses.so.5 /usr/lib/libncurses.so.54. 验证安装
运行以下命令检查库是否被Box86识别:box86 ldconfig -p | grep libncurses.so.5若输出包含
libncurses.so.5的路径,说明安装成功。
内容的提问来源于stack exchange,提问作者Krzysztof Fajst
相关产品推荐
相关产品推荐

