在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