ubuntu 18.04上执行buildman安装了交叉工具链之后编译报错"aarch64-linux/7.3.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory"如何处理?

  1. 完整日志如下:
$ PATH=$PATH:`pwd`/tools/buildman
$ buildman --fetch-arch aarch64
$ buildman -k my-board
~/.buildman-toolchains/gcc-7.3.0-nolibc/aarch64-linux/bin/../libexec/gcc/aarch64-linux/7.3.0/cc1: error while loading shared libraries: libmpfr.so
.4: cannot open shared object file: No such file or directory
  1. 检查库的情况
$ ldd ~/.buildman-toolchains/gcc-7.3.0-nolibc/aarch64-linux/libexec/gcc/aarch64-linux/7.3.0/cc1
libmpc.so.3 => /usr/lib/x86_64-linux-gnu/libmpc.so.3 (0x0000888888888888)
libmpfr.so.4 => not found
  1. 创建软链接, 如
$ cd /usr/lib/x86_64-linux-gnu
$ sudo ln -s libmpfr.so.6.0.1 libmpfr.so.4
posted @ 2020-06-23 10:20  Jello  阅读(3049)  评论(0编辑  收藏  举报