|||
给儿子搭建了信息奥赛的仿真环境,发现竟然无法安装软件,分析得知是APT源有问题,以如下方法解决:
查看当前系统的发行版信息
noilinux@ubuntu:~$ lsb_release -c
Codename: trusty
sudo vim /etc/apt/sources.list
将里面文件内容全部替换成下面:
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 保存以上,然后执行更新: sudo apt-get update 复损坏的软件包,尝试卸载出错的包,重新安装正确版本的: sudo apt-get -f install 更新软件: sudo apt-get upgrade 搞定!
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-6 08:39
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社