目錄
1.OpencCV-python安裝中依賴安裝問題
2.入坑第一課:切勿無腦換源
相信大家大部分都會拿手裏的樹莓派裝一個openvc-python,不例外,俺也一樣。但是今天在安裝過程中遇到一個問題:在跟着網上教程安裝過程中,安裝依賴 “libtiff5
“ 時”出現了問題:
錯誤信息如下:
The following packages have unmet dependencies:
libtiff5-dev : Depends: libjbig-dev but it is not going to be installed
Depends: libjpeg-dev
Depends: liblzma-dev but it is not going to be installed
Depends: libtiff5 (= 4.0.8-2+deb9u4) but 4.0.10-4 is to be installed
E: Unable to correct problems, you have held broken packages.
搞了一天才搞定,現在分享一下經驗。
真正的原因就是:你在剛開始的時候的源換的出了問題,這裏拿清華的鏡像源舉例子:
你的源是不是這樣的:
http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
但是你注意看後面的stretch,你的系統版本是不是stretch呢??
命令行運行下面命令查看系統版本:
cat /etc/debian_version
然後跟上面對應,比如說我的是10.3,那我就把stretch改成buster,也就是把源更新爲
http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
系統源也是同理,怎麼換源自行百度!