Ubuntu的Unable to locate package无法更新源问题解决方案
https://blog.csdn.net/long19910605/article/details/47017889/
问题:
更新源时提示不能联网(does the network require authentication?),但是明明可以ping通外网啊,原来是不能访问这个默认源,所以更换一下源
chen@ubuntu:~$ sudo apt-get update
Get: http://ppa.launchpad.net/nginx/stable/ubuntu xenial InRelease [2,281 B]
Err: http://ppa.launchpad.net/nginx/stable/ubuntu xenial InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Fetched , B in 0s (, B/s)
Reading package lists... Done
E: Failed to fetch http://ppa.launchpad.net/nginx/stable/ubuntu/dists/xenial/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Some index files failed to download. They have been ignored, or old ones used instead.
chen@ubuntu:~$ sudo apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nginx
编辑:sudo vi /etc/apt/sources.list
在下方添加163的源
deb http://mirrors.163.com/ubuntu/ precise main restricted
deb-src http://mirrors.163.com/ubuntu/ precise main restricted
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
deb http://mirrors.163.com/ubuntu/ precise-security universe
deb-src http://mirrors.163.com/ubuntu/ precise-security universe
deb http://mirrors.163.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
再次执行:sudo apt-get update
sudo apt-get upgrade
sudo apt install nginx
chen@ubuntu:~$ sudo apt-get update
Ign: http://mirrors.163.com/ubuntu precise InRelease
Get: http://mirrors.163.com/ubuntu precise Release [49.6 kB]
Get: http://mirrors.163.com/ubuntu precise Release.gpg [198 B]
Get: http://mirrors.163.com/ubuntu precise/main amd64 Packages [1,273 kB]
Get: http://mirrors.163.com/ubuntu precise/main i386 Packages [1,274 kB]
Get: http://mirrors.163.com/ubuntu precise/restricted amd64 Packages [8,452 B]
Get: http://mirrors.163.com/ubuntu precise/restricted i386 Packages [8,431 B]
Get: http://mirrors.163.com/ubuntu precise/universe amd64 Packages [4,786 kB]
Get: http://mirrors.163.com/ubuntu precise/universe i386 Packages [4,796 kB]
Get: http://mirrors.163.com/ubuntu precise/multiverse amd64 Packages [119 kB]
Get: http://mirrors.163.com/ubuntu precise/multiverse i386 Packages [121 kB]
Fetched 12.4 MB in 6s (, kB/s)
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
W: http://mirrors.163.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
chen@ubuntu:~$ sudo apt install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libgd2-noxpm nginx-common nginx-full
Suggested packages:
libgd-tools
The following NEW packages will be installed:
libgd2-noxpm nginx nginx-common nginx-full
upgraded, newly installed, to remove and not upgraded.
Need to get kB of archives.
After this operation, , kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get: http://mirrors.163.com/ubuntu precise/main amd64 libgd2-noxpm amd64 2.0.36~rc1~dfsg-6ubuntu2 [200 kB]
Get: http://mirrors.163.com/ubuntu precise/universe amd64 nginx-common all 1.1.19-1 [17.8 kB]
Get: http://mirrors.163.com/ubuntu precise/universe amd64 nginx-full amd64 1.1.19-1 [379 kB]
Get: http://mirrors.163.com/ubuntu precise/universe amd64 nginx all 1.1.19-1 [6,612 B]
Fetched kB in 0s ( kB/s)
Selecting previously unselected package libgd2-noxpm:amd64.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../libgd2-noxpm_2.0.36~rc1~dfsg-6ubuntu2_amd64.deb ...
Unpacking libgd2-noxpm:amd64 (2.0.~rc1~dfsg-6ubuntu2) ...
Selecting previously unselected package nginx-common.
Preparing to unpack .../nginx-common_1.1.19-1_all.deb ...
Unpacking nginx-common (1.1.-) ...
Selecting previously unselected package nginx-full.
Preparing to unpack .../nginx-full_1.1.19-1_amd64.deb ...
Unpacking nginx-full (1.1.-) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.1.19-1_all.deb ...
Unpacking nginx (1.1.-) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for systemd (-4ubuntu21.) ...
Processing triggers for ureadahead (0.100.-) ...
Processing triggers for man-db (2.7.-) ...
Setting up libgd2-noxpm:amd64 (2.0.~rc1~dfsg-6ubuntu2) ...
Setting up nginx-common (1.1.-) ...
Setting up nginx-full (1.1.-) ...
Setting up nginx (1.1.-) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for systemd (-4ubuntu21.) ...
Processing triggers for ureadahead (0.100.-) ...
Ubuntu的Unable to locate package无法更新源问题解决方案的更多相关文章
- Ubuntu:Unable to locate package ***
在Ubuntu 上使用apt-get 安装包时遇到 Unable to locate package 的信息 解决方案: 更细apt-get然后重新安装 #sudo apt-get update ...
- Ubuntu : 解决更新时出现 Unable to locate package update
当用apt-get更新软件包时常出现错误提示Unable to locate package update, 尤其是在ubuntu server上,解决方法是: 先更新apt-get ...
- linux -- Ubuntu报错“unable to locate package...”
有时候在Ubuntu命令行中执行安装某个文件的时候,如:sudo apt-get install xinit ,报 “unable to locate package...” 错误,解决办法如下 1. ...
- Ubuntu install 错误 E:Unable to locate package
今天在 Ubuntu 上执行 sudo apt install sl 命令,结果报错:E:Unable to locate package sl 上网查询了一下,先更新一下 apt-get,执行:su ...
- 【转】ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package
问题: VMware虚拟机安装了ubuntu 11.04,在使用apt-get安装软件时一直提示E:Unable to locate package. 百度了原因,说是要更新源,使用命令:sudo a ...
- Ubuntu Server安装telnet服务时"Unable to locate package telnetd"解决方法
装好Ubuntu Server 12.04后,用apt-get安装telnetd报"E: Unable to locate package telnetd",解决方法如下: 虚拟机 ...
- ubuntu 安装nginx, 出现 Unable to locate package
今天在初始化一台新的ubuntu 服务器时,敲上了 sudo apt-get install nginx 来安装nginx, 却发现提示: Reading package lists... Done ...
- Docker:Err http://archive.ubuntu.com trusty InRelease & E: Unable to locate package [name] 问题
参考: Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host Unable to locate package错误解决办法 ...
- ubuntu 14.04 编译内核出现unable to locate package ncurses-devel 问题的解决
http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece7631046893b4c4380146d96864968d4e414c422461614 ...
随机推荐
- c#实现QQ群成员列表导出及邮件群发开篇
主题已迁移至:http://atiblogs.com/ ITO-神奇的程序员
- windows下安装ImageMagick
最近在开发过程中用到了ImageMagick,结合网上的教程做一下记录 安装的具体步骤可以参考http://blog.csdn.net/belen_xue/article/details/728962 ...
- Stratix IV内嵌DPA电路的基本结构
StratixIV内嵌DPA电路的基本结构 Altera DPA电路特点如下. 可以放松高速接口对时钟到数据通道和数据通道之间对Skew的严格要求. 最高支持1.6Gbit/s应用. 专用硬件DPA ...
- 1134 Vertex Cover
题意:给出一个图和k个查询,每个查询给出Nv个结点,问与这些结点相关的边是否包含了整个图的所有边. 思路:首先,因为结点数较多,用邻接表存储图,并用unordered_map<int,unord ...
- VMware虚拟机上网络连接模式bridged(桥接模式)
VMware虚拟机上网络连接模式bridged(桥接模式)的实质就是虚拟机本身利用主机的网卡对外直接作为一个真实的物理主机存在. 也就是理论上此时的虚拟机和主机没什么关系,只是和主机公用了一块网卡,其 ...
- 请求时控制器的返回结果view()怎么会默认调到某个页面的?
请求时控制器的返回结果view()怎么会默认调到某个页面的? (1)请求时会拿方法行为的名字去和视图的名字对应,会默认去views视图下的与控制器名称一样的文件夹下名字与方法对应的视图文件匹配对应,然 ...
- Spring总结四:IOC和DI 注解方式
首先我们要了解注解和xml配置的区别: 作用一样,但是注解写在Bean的上方来代替我们之前在xml文件中所做的bean配置,也就是说我们使用了注解的方式,就不用再xml里面进行配置了,相对来说注解方式 ...
- C# 堆和栈的区别?
解释1.栈是编译期间就分配好的内存空间,因此你的代码中必须就栈的大小有明确的定义:堆是程序运行期间动态分配的内存空间,你可以根据程序的运行情况确定要分配的堆内存的大小 解释2. 存放在栈中时要管存储顺 ...
- QPS、PV和需要部署机器数量计算公式
QPS:Queries Per Second意思是“每秒查询率”,是一台服务器每秒能够相应的查询次数,是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准. TPS是 Transactions ...
- java代码优化29个点
通过java代码规范来优化程序,优化内存使用情况,防止内存泄露 可供程序利用的资源(内存.CPU时间.网络带宽等)是有限的,优化的目的就是让程序用尽可能少的资源完成预定的任务.优化通常包含两方面的内容 ...