Linux篇 二、香橙派Zero2获取Linux SDK源码

系列文章目录

一、香橙派Zero2设置开机连接wifi
二、香橙派Zero2获取Linux SDK源码


前言

编译Lixnu 的SDK并记录

一、查看自己Ubuntu的版本

lsb_release -a

在这里插入图片描述
我可以编译orangepi-build 18.04的镜像

二、更换软件源

把软件源更换成清华的软件源

vim /etc/apt/sources.list

然后在命令模式下按下小写字母 ,移动到这个档案的第一行

gg

然后删除光标所在到最后一行的所有数据

dG

然后复制清华镜像源进去

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse



# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

update一下

sudo apt update

在这里插入图片描述

三、从 github 下载 orangepi-build.

sudo apt -y install git

在这里插入图片描述
然后克隆

git clone https://github.com/orangepi-xunlong/orangepi-build.git

报错

在这里插入图片描述
RPC失败;
curl 35 GnuTLS recv error (-54): pull函数出错。。
fatal:远端意外挂断

但是网上找到的基本都是curl56的错误,找不到curl35的

在这里插入图片描述
只能试一试了

把git的

git config --global http.postBuffer 20000000

又有其他错误

在这里插入图片描述
网上查到资料说
将命令行里的http改为git重新执行

git clone git://github.com/orangepi-xunlong/orangepi-build.git

也不行
网上都是说取消代理
我试试看取消一下全局代理吧

git config --global --unset http.proxy
git config --global --unset https.proxy

重新拉

git clone git://github.com/orangepi-xunlong/orangepi-build.git

或者

git clone http://github.com/orangepi-xunlong/orangepi-build.git

在这里插入图片描述
ok,成功了


总结

主要是改git的代理,或者先把github先搞到码云上,在用码云的链接理论上也是可以的

猜你喜欢

转载自blog.csdn.net/qq_41930631/article/details/128299241