linux C++库文件编译报错:error: file not recognized: File format not recognized
在升级 thrift 版本时,遇到编译报以下错误:libthrift-0.13.0.so:-1: error: file not recognized: File format not recognized这种问题是文件格式有问题,通过查看文件属性:#异常库文件指令:file libthrift-0.13.0.so返回:libthrift-0.13.0.so: ELF 64-bit LSB sha
·
在升级 thrift 版本时,遇到编译报以下错误:
libthrift-0.13.0.so:-1: error: file not recognized: File format not recognized
这种问题是文件格式有问题,通过查看文件属性:
#异常库文件
指令:file libthrift-0.13.0.so
返回:libthrift-0.13.0.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), statically linked, stripped
#正常库文件
指令:file libglog.so
返回:libglog.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=14927e8db6b16810f4397cfd7c6ee8dc84ee9df3, not stripped
后面排查发现在编译后的库文件正常,复制到开发虚拟机上的库文件有问题,通过windows中转直接进行复制粘贴库文件会导致库文件异常,使用第三方工具如SecureFX 则能正常使用
更多推荐
已为社区贡献1条内容
所有评论(0)