wsl下安装交叉编译问题解决
打不开wsl
WSL2 ERROR: 0x800701bc
run wsl --update --status in powershell
run wsl.exe --update in powershell无法编译的问题
因为我的交叉编译工具是32位的,所以win10下的wsl没法使用
使用如下命令
arm-none-linux-gnueabi-gcc -v会出现下面的告警
-bash: /usr/local/arm/arm-2014.05/bin/arm-none-linux-gnueabi-gcc: cannot execute binary file: Exec format error或者出现:
arm-none-linux-gnueabi-gcc No such file or directory除了要安装一些支持的库之外,还需要下面的设置
sudo apt update
sudo apt install qemu-user-static
sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'常见的库如下
sudo apt-get install lsb-core lib32stdc++6
sudo apt-get install lib32ncurses5 lib32ncurses5-dev
sudo apt-get install lib32z1