【欢迎关注编码小哥,学习更多实用的编程方法】
需要下载ncnn源码,需要明确ping www.baidu.com 通不通,如果不通,则
修改/etc/resolv.conf
Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 192.168.93.2
#nameserver 127.0.1.1
#search localdomain
nameserver 8.8.8.8
nameserver 114.114.114.114
重启网络
/etc/init.d/networking restart
/sbin/dhclient
此时,网络已经通了,但是git clone https://github.com/Tencent/ncnn.git时,出现:
fatal: unable to access 'https://github.com/Tencent/ncnn.git/': Operation timed out after 0 milliseconds with 0 out of 0 bytes received
则取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
git clone https://github.com/Tencent/ncnn.git
root@ubuntu-virtual-machine:/home/ncnn# mkdir build
root@ubuntu-virtual-machine:/home/ncnn# cd build
root@ubuntu-virtual-machine:/home/ncnn/build# cmake -DNCNN_VULKAN=OFF ..
编译ncnn情况如下图所示:
make install安装ncnn