問題描述
在Ubuntu24.04版本上編譯RK3568應用程序關于libmpfr.so.4: cannot open shared object問題,如下所示:
/tools/ToolsChain/rockchip/rockchip_rk3568/host/bin/../libexec/gcc/aarch64-buildroot-linux-gnu/9.3.0/cc1plus: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
make: *** [Makefile:55: publib/iniparser/dictionary.o] Error 1
解決方案
將高版本的 libmpfr
(如 libmpfr.so.6
),手動創建符號鏈接:
執行以下命令
sudo find / -name "libmpfr.so.6"
找到libmpfr.so.6文件的位置,如下圖所示:
執行以下命令添加鏈接
sudo ln -s libmpfr.so.6 libmpfr.so.4
之后到需要編譯的應用程序目錄重新編譯即可。