本文适用于给老古董边缘计算平台安装python2时解决依赖问题,其他类似问题也可以套用下试试
执行备份命令,执行
sudo cp sources.list sources.list.backup
对源文件内容进行备份,以防万一
cd /etc/apt
sudo cp sources.list sources.list.backup
用sudo gedit sources.list打开源文件
sudo gedit sources.list
将里面内容全部删除
阿里源文件内容如下:复制下面内容替换掉源文件内容
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
PS:Ubuntu系统文档的使用方法和windows大有不同,请自行百度搜索。
更新软件
使用 sudo apt-get upgrade 即可更新软件
sudo apt-get upgrade
此时再次执行
sudo apt install python
即可正常下载python2和python3内容