Ubuntu18.04执行sudo apt install python时出现依赖问题

本文适用于给老古董边缘计算平台安装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内容

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值