Linux 工具链 error while loading shared libraries: libgettextsrc-0.19.8.1.so 解决方法

编译 openWRT 的时候,出现如下错误内容:

make[3]: Entering directory '/home/robot/OpenWrt/mtk762x-19.07/tools/quilt'
make -C /home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65 SHELL="bash" all
make[4]: Entering directory '/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65'
/usr/local/arm_linux_4.8/usr/bin/msgmerge -o po/fr.po po/fr.po po/quilt.pot
/usr/local/arm_linux_4.8/usr/bin/msgmerge: error while loading shared libraries: libgettextsrc-0.19.8.1.so: cannot open shared object file: No such file or directory
Makefile:149: recipe for target 'po/fr.po' failed
make[4]: *** [po/fr.po] Error 127
make[4]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65'
Makefile:36: recipe for target '/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65/.built' failed
make[3]: *** [/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65/.built] Error 2
make[3]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07/tools/quilt'
time: tools/quilt/compile#0.04#0.01#0.06
tools/Makefile:157: recipe for target 'tools/quilt/compile' failed
make[2]: *** [tools/quilt/compile] Error 2
make[2]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07'
tools/Makefile:155: recipe for target '/home/robot/OpenWrt/mtk762x-19.07/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyyy' failed
make[1]: *** [/home/robot/OpenWrt/mtk762x-19.07/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyyy] Error 2
make[1]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07'
/home/robot/OpenWrt/mtk762x-19.07/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2

解决办法:
按照基本的套路,要在服务器上进行语言文件的生成,就得安装 gettext

apt-get install gettext

安装后还是不可以;

robot@ubuntu:~/OpenWrt/mtk762x-19.07$  ls -la $(which msgfmt)
-rwxr-xr-x 1 root root 91416 Sep 21  2020 /usr/local/arm_linux_4.8/usr/bin/msgfmt

发现 path 路径中的 arm_linux_4.8 ,才想起 此虚拟机 前面使用过 buildroot 编译arm9 的芯片,修改 /etc/profile 文件,
内容如下:

#nuc980iot cross_compile
#export ARCH=arm
#export CROSS_COMPILE=/usr/local/arm_linux_4.8/bin/arm-nuvoton-linux-uclibceabi-
#export PATH=/usr/local/arm_linux_4.8/bin:$PATH

# java-1.8.0-openjdk-amd64  config
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export JRE_HOME=${
    
    JAVA_HOME}/jre
export CLASSPATH=.:${
    
    JAVA_HOME}/lib:${
    
    JRE_HOME}/lib
export PATH=${
    
    JAVA_HOME}/bin:$PATH

关闭 交叉编译工具链的环境内容,编译就不再包此错误。

参考链接:
https://84361749.com/post/ubuntu-bitnami-msgfmt-libgettextsrc-error.html

猜你喜欢

转载自blog.csdn.net/weixin_38387929/article/details/115264707