ubuntu apt-get 源

一、 概述
   安装完Ubuntu系统,系统默认选择了Ubuntu的repositoy源,有3个,security、archive、extra。但是这3个源无法用于apt-get update。会有报错,所以需要更改源。
二、 报错信息:
W: GPG error: http://extras.ubuntu.com 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 http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ 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 http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

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

deb http://archive.canonical.com/ubuntu/ trusty partner

deb http://extras.ubuntu.com/ubuntu/ trusty main

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

deb http://ubuntu.srt.cn/ubuntu/ trusty main restricted universe multiverse

deb http://ubuntu.srt.cn/ubuntu/ trusty-security main restricted universe multiverse

deb http://ubuntu.srt.cn/ubuntu/ trusty-updates main restricted universe multiverse

deb http://ubuntu.srt.cn/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://ubuntu.srt.cn/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://ubuntu.srt.cn/ubuntu/ trusty main restricted universe multiverse

deb-src http://ubuntu.srt.cn/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://ubuntu.srt.cn/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://ubuntu.srt.cn/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://ubuntu.srt.cn/ubuntu/ trusty-backports main restricted universe multiverse

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

deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

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

deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse

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

deb http://mirror.lupaworld.com/ubuntu trusty main restricted universe multiverse

deb http://mirror.lupaworld.com/ubuntu trusty-security main restricted universe multiverse

deb http://mirror.lupaworld.com/ubuntu trusty-updates main restricted universe multiverse

deb http://mirror.lupaworld.com/ubuntu trusty-backports main restricted universe multiverse

deb http://mirror.lupaworld.com/ubuntu trusty-proposed main restricted universe multiverse

deb-src http://mirror.lupaworld.com/ubuntu trusty main restricted universe multiverse

deb-src http://mirror.lupaworld.com/ubuntu trusty-security main restricted universe multiverse

deb-src http://mirror.lupaworld.com/ubuntu trusty-updates main restricted universe multiverse

deb-src http://mirror.lupaworld.com/ubuntu trusty-backports main restricted universe multiverse

deb-src http://mirror.lupaworld.com/ubuntu trusty-proposed main restricted universe multiverse

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

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

deb http://centos.bitcomm.cn/ubuntu trusty main restricted universe multiverse

deb http://centos.bitcomm.cn/ubuntu trusty-security main restricted universe multiverse

deb http://centos.bitcomm.cn/ubuntu trusty-updates main restricted universe multiverse

deb http://centos.bitcomm.cn/ubuntu trusty-backports main restricted universe multiverse

deb http://centos.bitcomm.cn/ubuntu trusty-proposed main restricted universe multiverse

deb-src http://centos.bitcomm.cn/ubuntu trusty main restricted universe multiverse

deb-src http://centos.bitcomm.cn/ubuntu trusty-security main restricted universe multiverse

deb-src http://centos.bitcomm.cn/ubuntu trusty-updates main restricted universe multiverse

deb-src http://centos.bitcomm.cn/ubuntu trusty-backports main restricted universe multiverse

deb-src http://centos.bitcomm.cn/ubuntu trusty-proposed main restricted universe multiverse

时间: 2024-10-14 18:31:58

ubuntu apt-get 源的相关文章

ubuntu apt 换源

修改配置文件/etc/apt/sources.list 内容替换为 阿里镜像源 deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ viv

Ubuntu软件安装指南:dpkg、apt 与源码包安装

基础知识: 通常情况下,linux会这样放软件的组件(一般规范): 程序的文档->/usr/share/doc; /usr/local/share/doc 程序->/usr/share; /usr/local/share 程序的启动项->/usr/share/apps; /usr/local/share 程序的语言包->/usr/share/locale; /usr/local/share/locale 可执行文件->/usr/bin; /usr/local/bin 而有的软

ubuntu更换apt-get源&apt命令使用手册

ubuntu更换apt-get源 # cp /etc/apt/sources.list /etc/apt/sources.list.bak # vim /etc/apt/sources.list deb http://mirrors.163.com/ubuntu/ precise main restricted deb-src http://mirrors.163.com/ubuntu/ precise main restricted deb http://mirrors.163.com/ubu

ubuntu apt源

deb http://mirrors.oschina.net/ubuntu/ raring main restricted universe multiversedeb http://mirrors.oschina.net/ubuntu/ raring-backports main restricted universe multiversedeb http://mirrors.oschina.net/ubuntu/ raring-proposed main restricted univers

嵌入式linux开发环境搭建(五)——Ubuntu第三方软件仓库源

嵌入式linux开发环境搭建(五)--Ubuntu第三方软件仓库源 一般来说ubuntu官方的软件仓库由于服务器在国外,下载更新速度较慢,需要将软件仓库更换为国内镜像点. 1.修改源配置文件 先备份原来的配置文件 mv /etc/apt/sources.list /etc/apt/sources.list.bak vim /etc/apt/sources.list 将国内的Ubuntu镜像点添加到配置文件 Ubuntu 163镜像点: deb http://mirrors.163.com/ubu

ubuntu apt常用命令

apt-cache search packagename 搜索包 apt-cache show packagename 获取包的相关信息,如说明.大小.版本等 apt-get install packagename 安装包 apt-get install packagename --reinstall 重新安装包 apt-get -f install 修复安装 apt-get remove packagename 删除包 apt-get remove packagename --purge 删除

Linux学习笔记——Ubuntu更新软件源

0.前言 通过修改ubuntu软件源可提高apt命令下载安装软件的速度. 参考资料 [官方资料]--配置文件修改方法 [Ubuntu怎样修改软件源地址]--使用ubuntu软件中心修改(推荐) [at-get update错误处理] 1.使用ubuntu软件中心更新 请参考[Ubuntu怎样修改软件源地址]--来自百度经验 图1 打开软件和更新 图2 选择国内软件源 2.使用指令方法修改 [1]首先备份源列表 sudo cp /etc/apt/sources.list /etc/apt/sour

ubuntu apt 命令参数(转)

apt-get是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索.安装.升级.卸载软件或操作系统. apt-get update 在修改/etc/apt/sources.list或/etc/apt/preferences之後运行该命令.此外您需要定期运行这一命令以确保您的软件包列表是最新的. Ubuntu APT常用命令参数具体介绍Ubuntu APT命令参数,让大家了解Ubuntu APT命令参数使用,希望对大家有用.Ubuntu 是一个完全以 Linu

nginx1.11.9 apt即源码编译各平台测试

测试系统:ubuntu16.04 server,debian8.7 netinstall,centos7 mini. 系统配置:使用virtualbox安装,内存1G,cpu单核,物理CPU  i5-4460 3.20GHz 测试目标:源码编译nginx-1.11.9,源码编译openresty/1.11.2.2,ubuntu apt nginx-1.10,debian apt nginx-1.6 测试工具:ab 2.3 测试方法:安装完成后,使用index.html内容为"helloworld

Ubuntu 官方推荐源列表

如何使用Ubuntu Night Ubuntu Night(  http://ubuntu9.com ) 的Top mirror功能根据当前的网络情况和源健康状况不断地进行更新当前可用的源的信息,包括了Top fast/near/stable mirror,可以找到当前网络上所有可用的Ubuntu 镜像(即源),并按照平均下载速度和地理位置进行排名.而且,当你找到最适合你的源之后,还可以直接下载它的sources.list 文件,并可直接将它copy到/etc/apt/sources.list或