Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3014174
  • 博文数量: 454
  • 博客积分: 4860
  • 博客等级: 上校
  • 技术积分: 6375
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-13 10:08
个人简介

10年工作经验,专研网站运维。

文章分类

全部博文(454)

文章存档

2017年(11)

2016年(13)

2015年(47)

2014年(36)

2013年(147)

2012年(64)

2011年(136)

分类: 系统运维

2015-04-29 10:52:56

                                                        更换Ubuntu 14.04的apt-get 源
一、 概述

        安装完Ubuntu系统,系统默认选择了Ubuntu的repositoy源,有3个,security、archive、extra。但是这3个源无法用于apt-get update。会有报错,所以需要更改源。
二、 报错信息:
W: GPG error: trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
三、分析
    应该是所指向的源需要有正确的pubkey,所以简单的说就是这个源不可用。
四、 解决方案
更换源
4.1 备份源的配置文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
4.2 编辑源的配置文件
vim /etc/apt/sources.list
把所有内容都删除,只保留最上面的注释就行了(因为怕有格式的问题而不可用,所以就想保留格式。)
#
#deb cdrom `````````
#deb cdrom
4.3 把如下的内容复制进文件

deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

4.4 保存并推出即可。
4.5 更新一下
sudo apt-get update.
4.6 大功告成
五、 总结
就是源不可用,还可以把源设置成自己的光盘也行。
六、 如下博客帮了我大忙,转发一下

Ubuntu 14.04 LTS更新源
  • 首先备份源列表:
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
  • 而后用gedit或其他编辑器打开:
 sudo gedit /etc/apt/sources.list


  • 从下面列表中选择合适的源,替换掉文件中所有的内容,保存编辑好的文件:
 注意:一定要选对版本
  • 然后,刷新列表:
sudo apt-get update



Ubuntu 官方更新服务器(欧洲,此为官方源,国内较慢,但无同步延迟问题,电信、移动/铁通、联通等公网用户可以使用):


deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

Ubuntu官方提供的其他软件(第三方闭源软件等):


deb trusty partner

deb /ubuntu/ trusty main

 


骨头兄亲自搭建并维护的 Ubuntu 源(该源位于浙江杭州百兆共享宽带的电信机房),包含 Deepin 等镜像:


deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

 


网易163更新服务器(广东广州电信/联通千兆双线接入),包含其他开源镜像:


deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

 


搜狐更新服务器(山东联通千兆接入,官方中国大陆地区镜像跳转至此) ,包含其他开源镜像:


deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

 


LupaWorld 更新服务器(浙江杭州电信/联通双线服务器),包含其他开源镜像:


deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

 


常州贝特康姆软件技术有限公司 更新服务器(江苏常州电信服务器),包含其他开源镜像。


( CN99域名 系 “常州市亚科技术有限公司” 所注册,但此公司与常州贝特康姆的法人代表和营业地址相同。所以本镜像实际即原 CN99。但现在 CN99镜像的域名已改为跳转至网易镜像):


deb trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse



转自:http://chenrongya.blog.163.com/blog/static/8747419620143185103297/


阅读(14616) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~