linux交叉编译时报错:file not recognized: File format not recognized

今天交叉编译sqlite3,make的时候报错:

sqlite3-shell.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

Makefile:410: recipe for target 'sqlite3' failed

文件格式不对,查了一下sqlite3-shell.o的文件格式

file sqlite3-shell.o

sqlite3-shell.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

是x86-64的,而我要编译的是arm版本的,所以这里报错了。

本来正常的交叉编译sqlite3是不会有这个错误的,因为我之前编译过x86的sqlite3,这次编译是make uninstall了一下,然后重新编,但是却没有将sqlite3-shell.o删除,所以报了这个错误

猜你喜欢

转载自blog.csdn.net/u011113596/article/details/80325081
今日推荐