ubuntu中可以使用命令行
sudo apt install gcc-arm-linux-gnueabi
自动安装交叉编译工具,但是往往软件版本太过超前了,交叉编译时候使用的命令是
arm-linux-gnueabi-gcc --static hello.c -o hello
但是hello程序在arm平台上执行不了。显示:
fatal:kernel too old!
这是因为交叉编译工具的版本不兼容,所以要卸载了安装对应版本的交叉编译工具:
因为使用arm-linux-gnueabi-gcc惯了,直接执行sudo apt remove arm-linux-gnueabi-gcc发现一直找不到安装包,但是whereis arm-linux-gnueabi-gcc时候可以差找到安装包和库文件的位置。
http://installion.co.uk/ubuntu/vivid/universe/g/gcc-arm-gnueabi/uninstall/index.html 提供了卸载的方法:
只卸载gcc-arm-linux-gnueabi的话使用命令:
sudo apt remove gcc-arm-linux-gnueabi
将其相关文件全部卸载:
sudo apt remove --auto-remove gcc-arm-linux-gnueabi
本文介绍在Ubuntu中使用命令行安装交叉编译工具的方法,以及如何解决因工具版本过高导致的不兼容问题。包括卸载不兼容版本的具体步骤。
2458

被折叠的 条评论
为什么被折叠?



