在Ubuntu(x64)系统下安装64bit的arm交叉编译工具aarch64-linux-gnu-gcc

在Ubuntu(x64)系统下安装64bit的交叉编译工具aarch64-linux-gnu-gcc_Alex-L的博客-CSDN博客

apt-cache search aarch64

https://askubuntu.com/questions/1061979/cross-compile-for-armhf-and-install-a-static-library

sudo apt-get install gcc-8-aarch64-linux-gnu
 aarch64-linux-gnu-gcc -v

Ubuntu 嵌入式 Arm-aarch64 开发环境搭建_tpmamba的博客-CSDN博客

sudo apt install g++-aarch64-linux-gnu

aarch64-linux-gnu-g++ -v

sudo apt-get install gcc gcc-aarch64-linux-gnu 
sudo apt-get install automake autoconf libtool make
sudo apt-get install libncurses5-dev libncursesw5-dev
sudo apt-get install device-tree-compiler
sudo apt-get install zlib1g-dev


apt-get update
apt-get install binutils-multiarch

dpkg --add-architecture armhf
# Manually add correct armhf repositories to /etc/apt/sources.list

 vim /etc/apt/sources.list
 

deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial main restricted
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted

deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted

deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates universe

deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security main restricted
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security multiverse

apt-get update
apt-get install libudev-dev:armhf

问题解决方法:aarch64-linux-gnu/bin/ld: cannot find -lssl_u014248033的博客-CSDN博客

git clone https://github.com/openssl/openssl.git
cd openssl
git checkout OpenSSL_1_0_2-stable
./config --prefix=/usr/aarch64-linux-gnu/lib/ --cross-compile-prefix=aarch64-linux-gnu- no-asm shared
sed -i "s/-m64//g" Makefile
make
sudo make install

https://ubuntu.forumming.com/question/9939/cross-compile-for-armhf-and-install-a-static-library

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值