进入软件包源地址文件:
sudo vim /etc/apt/sources.list
删除sources.list中所有内容,输入以下更新源地址(全部复制粘贴写入sources.list文件,任选一个即可):阿里云(推荐):
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
若还没有解决:
进入Debian后输入apt-get update后报错显示没有Release文件:
执行以下命令:
cd /etc/apt/sources.list.d
rm AdoptOpenJDK.list mobian.list
cd
解决后:
sudo apt update
sudo apt upgrade
安装opencv指令:
sudo apt-get install python3-opencv 不允许使用pip3