sudo apt-get install/update报错

ubuntu安装软件或执行软件更新,sudo apt-get install/update报错,报错如下:

E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glew/libglew-dev_1.13.02_amd64.deb Temporary failure resolving ‘mirrors.tuna.tsinghua.edu.cn’

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

  1. 首先考虑是否为网络状态或软件更新源问题,更新软件源到清华镜像源
sudo vim /etc/apt/sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse

修改镜像源之后要执行更新

sudo apt-get update
sudo apt-get upgrade
  1. 如果软件更新源没有问题,那么是DNS配置出现问题,这里用的是阿里云的DNS服务器,执行下列命令
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 127.0.1.1
nameserver 223.5.5.5  
nameserver 223.6.6.6

你可能感兴趣的:(应用工具使用)