ubuntu DNS 导致apt-get install 无效问题

There are two parts to your question:

  • fixing temporary resolve messages
  • fixing the package management issues

Temporary resolve

It is likely that this issue is either:

  • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or
  • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.

Lets look at the possible DNS resolving issues.

First, temporarily add a known DNS server to your system.

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

Then run sudo apt-get update.

If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:

  echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

8.8.8.8 is Google‘s own DNS server.

source

Another example DNS server you could use is OpenDNS - for example:

echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

package-management issues

In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I‘m assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)

Open a terminal and type

sudo nano /etc/apt/sources.list

Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty

For example, look for lines that look like deb http:/archive.canonical.com/ natty backports

Add a # to the beginning of the line to comment it out - for example

#deb http:/archive.canonical.com/ natty backports

Save and re-run:

sudo apt-get update && sudo apt-get upgrade

You should not have any more release naming errors.

At the time of writing this, possible common release names include lucidmavericknattyoneiricprecise and quantal

时间: 2024-10-15 20:41:58

ubuntu DNS 导致apt-get install 无效问题的相关文章

Ubuntu DNS bind9 配置

下面的配置就是实现解析test.zp.com到不同的IP地址 安装dns server软件包$ apt-get install bind9 配置dns配置文件的路径在/etc/bind路径下面添加一个zone$ /etc/bind# vim /etc/bind/named.conf.local 添加下面,语法可以参照/etc/bind/zones.rfc1918中的语法添加,如下: zone "zp.com" { type master; file "/etc/bind/db

Linux(Ubuntu)使用 sudo apt-get install 命令安装软件的目录在哪?(已解决)

Linux(Ubuntu)使用   sudo apt-get install  命令安装软件的目录在哪? bin文件路径: /usr/bin 库文件路径: /usr/lib/  其它的图标啊什么的路径: /usr/share 配置文件路径: /etc/

Ubuntu Touch On Nexus4 Manual Install (手动安装) under Gentoo

Table of Contents 1. 准备工作: 2. Saucy Salamander 3. 刷入 最新 版Touch 最近手里的 Nexus 4 手机一直闲置,它的配置要比我六年前买的笔记本还好,于是就动起了向里面刷个 Ubuntu Touch 的想法. 1 准备工作: 安装 Adb tools, google 一下即可. 开启开发者模式. 终端执行 "adb reboot bootloader" 进入 fastboot 终端执行 "fastboot oem unlo

win8不能解析DNS导致不能访问外网问题

win8不能解析DNS导致不能访问外网问题 win8系统以前都可以正常上网,早上发现不能访问外网问题,内网可以访问.找运维同事查看后,发现是DNS不能解析问题,这个问题可能是win8自身的bug,也可能是安装其它软件时不小心造成的.具体解决方法如下: 1 将用户切换为Administrator用户,即管理员用户.如果管理员用户被禁用,通过以下步骤操作: 然后切换至管理员账户,通过管理员账户进入win8系统. 2 重置DNS服务器 重置后即可正常上网了.

Deepin 15.11 安装软件出现“您也许需要运行“apt --fix-broken install”来修正上面的错误

解决方案: #sudo apt --fix-broken install -y 原文地址:https://www.cnblogs.com/xlpc/p/12317000.html

解决ubuntu使用命令sudo apt -get install 安装东西时出现"E: Sub-process /usr/bin/dpkg returned an error code (1) "的错误

问题描述: 今天在使用命令 "sudo apt-get install python3-pip"安装时,总是出现如下图这样的错误,开始以为是以为自己python版本的问题,后来发现无论装什么东西都会出现,这样的错误,错误展示: 解决方案: 进入如下目录: cd /var/lib/dpkg 删除下面这个文件: sudo mv info info.baksudo 重新创建这个文件: sudo mkdir info 如下图所示: 再次安装: (1)安装pip3: sudo apt-get i

ubuntu 更新源 或者 apt-get install 出错404 not found ,Failed to fetch

1.考虑是不是能上网 2.用apt-get update ,然后再试试apt-get install 如果apt-get update 也出现很多 404 not found 或者 failed to fetch ,就要考虑更换自己的源,百度搜 /etc/apt/sources.list 3.如果还不行,估计是Ubuntu版本太老了,没有维护的了. 比如我用11.04,sudo apt-get install open-vm-dkms 不行,sudo apt-get  update  不行,就死

Ubuntu 软件包管理APT

一.APT简介 "起初 GNU/Linux 的世界中只有 .tar.gz.如果用户要使用一个软件,那就必须自己编译.当 Debian 诞生以后,一种能管理操作系统中已安装的软件包的系统显得很有必要,这个系统被命名 'dpkg'.'软件包'一词在此第一次出现在 GNU/Linux.不久之后,红帽公司创建了他们自己的包管理系统'rpm'. "GNU/Linux 的创造者们很快又陷入了新的窘境.他们希望通过一种快捷.实用而且高效的方式来安装软件包,并能自动处理相互之间的依赖关系,还要在软件包

Ubuntu 14.04 – How to install xrdp in Ubuntu 14.04

http://c-nergy.be/blog/?p=5305 Hello World, Ubuntu 14.04 has been released on April 17th 2014 and we already released the traditional post about how to perform a fresh install. We didn’t covered the upgrade process because it’s quite easy nowadays. B