问题描述
在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
之后到需要编译的应用程序目录重新编译即可。