问题
centos for m1启动kibana7.13.0报错
Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /var/local/kibana-7.13.0-linux-aarch64/node_modules/re2/build/Release/re2.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at Module.Hook._require.Module.require (/var/local/kibana-7.13.0-linux-aarch64/node_modules/require-in-the-middle/index.js:80:39)
at Module.Hook._require.Module.require (/var/local/kibana-7.13.0-linux-aarch64/node_modules/require-in-the-middle/index.js:80:39)
at Module.Hook._require.Module.require (/var/local/kibana-7.13.0-linux-aarch64/node_modules/require-in-the-middle/index.js:80:39)
at Module.Hook._require.Module.require (/var/local/kibana-7.13.0-linux-aarch64/node_modules/require-in-the-middle/index.js:80:39)
at Module.Hook._require.Module.require (/var/local/kibana-7.13.0-linux-aarch64/node_modules/require-in-the-middle/index.js:80:39)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/var/local/kibana-7.13.0-linux-aarch64/node_modules/re2/re2.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
FATAL Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /var/local/kibana-7.13.0-linux-aarch64/node_modules/re2/build/Release/re2.node)
解决
1、执行以下命令,查找编译gcc时生成的最新动态库
find / -name "libstdc++.so*"
输出路径如下:
/var/local/elasticsearch-7.13.0/modules/x-pack-ml/platform/linux-aarch64/lib/libstdc++.so.6
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19 // 最新动态库
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo
2、因为上述es启动是没有报错的,所以推测es的动态库是完整的,因此将es的动态库覆盖到/usr/lib64目录下(提前做好备份)
cp /var/local/elasticsearch-7.13.0/modules/x-pack-ml/platform/linux-aarch64/lib/libstdc++.so.6 /usr/lib64
注意:我这里是es7.13.0与kibana安装在同一台虚拟机上的, 如果es不在同一台服务器,可将es中下述的libstdc++.so.6文件复制到kibana服务器中的/usr/lib64
scp /var/local/elasticsearch-7.13.0/modules/x-pack-ml/platform/linux-aarch64/lib/libstdc++.so.6 root@192.168.244.11:/usr/lib64
3、检查动态库
strings /usr/lib64/libstdc++.so.6 | grep GLIBC
4、重新启动kibana,正常