Linux-ubuntu16安装ncnn

Linux-ubuntu16安装ncnn,第1张

1.参考https://www.ziiai.com/blog/194

下载编译源码

git clone https://github.com/Tencent/ncnn

下载完成后,需要对源码进行编译

cd ncnn
mkdir build && cd build
cmake ..
make -j
make install

出现错误,protobuf有关。


Could NOT find Protobuf

2.参考https://www.jianshu.com/p/6bf604c9748a

但是安装的是protobuf-3.9.2。


结果又报错。


Protobuf compiler version 3.9.2 doesn't match library version 2.6.1

原文如下,

下载:

https://github.com/google/protobuf/releases --> protobuf-all-3.6.0.zip

编译安装流程(注意加上sudo防止创建目录权限不足):

unzip protobuf-all-3.6.0.zip
cd protobuf-all-3.6.0
./autogen.sh
./configure --prefix=/usr/local/protobuf
(
https://www.cnblogs.com/darkknightzh/p/5782992.html ./configure --prefix=/usr)
sudo make -j8 && sudo make install
ldconfig

环境变量配置:

sudo gedit ~/.bashrc
添加: PATH=/usr/local/protobuf/bin:$PATH
(如果findpackage报错注意添加lib和include到环境变量)
source ~/.bashrc

3.抓紧又下了个protobuf-2.6.1,按照2步骤再走一遍,结果就能把ncnn安装上了。


具体怎么回事,以后再研究。


 

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/563731.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-03
下一篇 2022-04-03

发表评论

登录后才能评论

评论列表(0条)

保存