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 ...
随机推荐
- ISO模型的七个分层
要想理解socket首先得熟悉一下TCP/IP协议族, TCP/IP(Transmission Control Protocol/Internet Protocol)即传输控制协议/网间协议,定义了主 ...
- 阿里Java开发规范记录(一)
近日,从网上下载了阿里云栖社区发布的<阿里巴巴Java开发手册(正式版)>v1.1.0版.从编程以来,一直苦于没有相关的.全面的.靠谱的规范可以参考,有了这手册,日后编程也算是找到了依 ...
- thinkphp中的dump方法
感受一下,调试. 1.print_r() 2.var_dump() 3.再看看thinkphp中的dump方法 清晰多了!真实够傻的,今天才发现有这么好的调试方法.
- Oracle sqlldr数据加载
1 sqlldr 传统路径:sqlldr会利用sql插入为我们加载数据 直接路径加载:sqlldr不适用sql,直接格式化数据块,绕开undo,避开redo,最快的方法就是并行直接路径加载 sqlld ...
- delphi 在桌面屏幕上模拟鼠标单击
delphi 在桌面屏幕上模拟鼠标单击 procedure TFrmUnicom.Button1Click(Sender: TObject); var oldPoint, newPoint: TPoi ...
- 前端工作准备-foxmail登陆失败汇总
foxmail 管理邮箱账号的一个工具软件, 但是在登陆的时候总是遇到明明账号密码没有问题,却总是报错,这里我登陆的时候的集中解决方法总结下: pop和imap 是邮箱的两种协议,大多选imap协议, ...
- Spring IOC设计原理解析:本文乃学习整理参考而来
Spring IOC设计原理解析:本文乃学习整理参考而来 一. 什么是Ioc/DI? 二. Spring IOC体系结构 (1) BeanFactory (2) BeanDefinition 三. I ...
- 【bzoj4296】再见Xor
4269: 再见Xor Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 176 Solved: 107[Submit][Status][Discuss ...
- Java两大测试方法Junit和TestNG的比较
开发过程中,经常会用到JAVA测试,前端javas cript的调试相对比较轻松,firebug,console.log()等,但是java的就比较纠结点,每次改完都要去编译再运行,过程相对缓慢,加上 ...
- SpringBoot15 sell01 项目创建、MySQL数据库连接、日志配置、开发热部署、商品信息模块
项目软件版本说明: jdk: 1.8 springboot: 2.0.1 mysql: 5.7 1 项目创建 创建一个SpringBoot项目即可,创建是勾选 web jpa mysql 这三个依赖就 ...