专栏文章目录传送门:返回专栏目录
目录
从源码编译问题查看,主要问题可能存在三个
- 网络问题
- python 版本问题
- 源码下载中断问题
开发环境 | EVK Board | Soc | kernel |
---|---|---|---|
Ubuntu 18.04 | i.MX 8M QUAD EVK | i.MX8MQ | kernel 5.10 |
1. 网络问题
由于本教程采用虚拟机方式,在windows设置了代理共享,在ubuntu 设置代理解决,主要涉及命令:
# repo设置proxy
export http_proxy=http://192.168.6.104:10809
export https_proxy=https://192.168.6.104:10809
# Git设置proxy
git config --global http.proxy http://192.168.6.104:10809
git config --global https.proxy https://192.168.6.104:10809
# 取消
git config --global --unset http.proxy
git config --global --unset https.proxy
Ubuntu 设置端口需要在代理端口的基础上加1(比如:共享端口设置10808,Ubuntu 设置是10809)
2. python版本问题
python 版本问题一般在于python2.x 与python3.x 的切换,这里强烈建议采用update-alternatives进行管理:
关于update-alternatives使用主要命令如下:
# 添加版本到管理中
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 3
#这里将python 版本改为Python3.8
sudo update-alternatives --config python
(当前项目忘记截图,以其他为例)
3. 源码下载中断问题
使用代理还存在问题:
org/git2_github.com.opencv.opencv_3rdparty.git.tar.gz’ --progress=dot -v
–2022-03-25 09:37:28-- http://sources.openembedded.org/git2_github.com.opencv.opencv_3rdparty.git.tar.gz
Connecting to 192.168.5.104:10809… connected.
Proxy request sent, awaiting response… 500 Internal Privoxy Error
发现下载opencv 不稳定,网络问题,这里可以复制链接,下载完成后放入路径中:
/mnt/work/zheng/linux_imx/imx-yocto-bsp/downloads/