Ubuntu sudo apt-get update提示 Failed to fetch,解决办法

问题:

执行sudo apt-get update提示:Failed to fetch

[email protected]:~/soft/Python-2.7.12$ sudo apt-get update
Get:1 http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu xenial InRelease [2,281 B]
Err:1 http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu xenial InRelease
  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
Fetched 2,281 B in 0s (4,524 B/s)
Reading package lists... Done
E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/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.

但是在虚拟机里面直接访问:http://ppa.launchpad.net/fkrull/deadsnakes-python2.7/ubuntu 是可以的啊

一、删除文件

  sudo rm -rf /var/lib/apt/lists

二、删除所有源

  

  

三、修改源

sudo vi /etc/apt/sources.list

里面写入163的源

deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse

  查看源

  

四、测试

再次sudo apt-get update

  提示如下:

[email protected]:~/soft/Python-2.7.12$ sudo apt-get update
Get:1 http://mirrors.163.com/ubuntu xenial InRelease [2,281 B]
Get:2 http://mirrors.163.com/ubuntu xenial-security InRelease [2,281 B]
Err:1 http://mirrors.163.com/ubuntu xenial InRelease
  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
Err:2 http://mirrors.163.com/ubuntu xenial-security InRelease
  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
Get:3 http://mirrors.163.com/ubuntu xenial-updates InRelease [2,281 B]
Err:3 http://mirrors.163.com/ubuntu xenial-updates InRelease
  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
Get:4 http://mirrors.163.com/ubuntu xenial-proposed InRelease [2,281 B]
Err:4 http://mirrors.163.com/ubuntu xenial-proposed InRelease
  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
Get:5 http://mirrors.163.com/ubuntu xenial-backports InRelease [2,281 B]
Err:5 http://mirrors.163.com/ubuntu xenial-backports InRelease
  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
Fetched 9,124 B in 0s (19.8 kB/s)
Reading package lists... Done
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-security/InRelease  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-updates/InRelease  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-proposed/InRelease  Clearsigned file isn‘t valid, got ‘NOSPLIT‘ (does the network require authentication?)
E: Failed to fetch http://mirrors.163.com/ubuntu/dists/xenial-backports/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.

五、切换认证

怎么还提示:does the network require authentication?

需要权限??

解决方法:将software$updates中的Authentication换一个试试

六、成功

  最后再执行一下:

sudo apt-get clean

sudo apt-get update

[email protected]:~/soft/Python-2.7.12$ sudo apt-get update
Get:1 http://mirrors.163.com/ubuntu xenial InRelease [247 kB]
Get:2 http://mirrors.163.com/ubuntu xenial-security InRelease [107 kB]
Get:3 http://mirrors.163.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://mirrors.163.com/ubuntu xenial-proposed InRelease [260 kB]
Get:5 http://mirrors.163.com/ubuntu xenial-backports InRelease [107 kB]
Get:6 http://mirrors.163.com/ubuntu xenial/main Sources [868 kB]
Get:7 http://mirrors.163.com/ubuntu xenial/restricted Sources [4,808 B]
Get:8 http://mirrors.163.com/ubuntu xenial/universe Sources [7,728 kB]
Get:9 http://mirrors.163.com/ubuntu xenial/multiverse Sources [179 kB]
Get:10 http://mirrors.163.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:11 http://mirrors.163.com/ubuntu xenial/main i386 Packages [1,196 kB]
Get:12 http://mirrors.163.com/ubuntu xenial/main Translation-en [568 kB]
Get:13 http://mirrors.163.com/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Get:14 http://mirrors.163.com/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Get:15 http://mirrors.163.com/ubuntu xenial/restricted amd64 Packages [8,344 B]
Get:16 http://mirrors.163.com/ubuntu xenial/restricted i386 Packages [8,684 B]
Get:17 http://mirrors.163.com/ubuntu xenial/restricted Translation-en [2,908 B]
Get:18 http://mirrors.163.com/ubuntu xenial/restricted amd64 DEP-11 Metadata [186 B]
Get:19 http://mirrors.163.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Get:102 http://mirrors.163.com/ubuntu xenial-backports/universe DEP-11 64x64 Icons [1,789 B]
Get:103 http://mirrors.163.com/ubuntu xenial-backports/multiverse amd64 DEP-11 Metadata [216 B]
Get:104 http://mirrors.163.com/ubuntu xenial-backports/multiverse DEP-11 64x64 Icons [29 B]
Fetched 53.4 MB in 18s (2,849 kB/s)
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done

终于搞定啦

原文地址:https://www.cnblogs.com/gcgc/p/10131617.html

时间: 2024-10-13 19:56:57

Ubuntu sudo apt-get update提示 Failed to fetch,解决办法的相关文章

UBuntu 命令行登录总是提示login incorrect 的解决办法

一.总是提示login incorrect 肯定是有原因的 1.在vm中安装Ubuntu,第一次设置的用户名是hello1990,密码是a1234567 进图图像界面后将用户名该为hqq,密码未做改变 2.通过ctrl+alt+f1(f1~f6都可以的 ),进入非图形界面,就是命令行, 如后输入hqq ,以及密码a1234567 提示login incorrect 后来用户民输入hello1990,密码a1234567,结果登录成功, 注意:非图形界面输入时,一定要记得将数字小键盘关闭,否则会一

ubuntu安装vmware12出现cannot ope dev/vmmon及modprobe vmmon提示密钥无效的解决办法

ubuntu12.04安装vmware12出现cannot ope dev/vmmon及modprobe vmmon提示密钥无效的解决办法 笔记本型号thinkpad E450C,前段时间删除了预装的windows,改成ubuntu12.04,并打算在ubuntu上安装一个windows虚拟机.下载vmware for linux并安装后,启动vmware提示"Cannot open /dev/vmmon: No such file or directory". 解决办法: 1.进入t

Ubuntu使用adb连接android手机失败unknown的解决办法

Ubuntu下通过USB数据线连接G11手机后,adb可能无法识别到设备.按照一下步骤可以解决此问题. 1.在terminal下面输入 lsusb [email protected]:~$ lsusb Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 003 Device 048: ID 17ef:7435 Lenovo Bus 003 Device 002:

Ubuntu连接以太网时显示“设备未托管”的解决办法

Ubuntu连接以太网时显示"设备未托管"的解决办法 故障分析: 电脑之前可能设置过PPOE(有线宽带虚拟拨号),常见为连接校园拨号宽带. 解决办法: 第一步:打开终端 第二步:切换到root用户 第三步:切换到 /etc/network 目录下:cd /etc/network/ 第四步:键入vim interface进入编辑interfaces文件模式.最后一行内容的意思是说eth0需要手动配置连接,但是当前局域网是DHCP网络,也就是接入网络的电脑需要"自动获取IP地址&

修改mysql字符编码出现Job failed to start解决办法

从网上找到如下资料: $sudo gedit /etc/mysql/my.cnf [client]下添加: default-character-set=utf8 [mysqld]下添加: default-character-set=utf8 然后保存退出 $ /etc/init.d/mysql restart 结果出现了: Since the script you are attempting to invoke has been converted to an Upstart job, you

mint/ubuntu Android Eclipse ADT 简单安装及运行崩溃解决办法

1. 下载 Android SDK(ADT Bundle) http://developer.android.com/sdk/index.html (网站访问不了或者慢,请参考:轻松修改本地hosts文件,稳定用谷歌搜索和谷歌服务) (不想弄这个,请去我的百度网盘下载:http://pan.baidu.com/s/1jGIDNO6) 2. 解压到一个目录下,例如: unzip adt-bundle-linux-x86_64-20140624.zip -d ~/ 解压后得到文件夹:adt-bund

Win7 64bit 安装VisualSVN出现报错:Servic 'VisualSVN Server' failed to start.解决办法

问题描述: Win7 64bit 安装VisualSVN时出现报错: Servic 'VisualSVN Server' failed to start.Please check VisualSVN Server log in Event Viewer for more details Service 'VisualSVN Server' failed to start. 解决办法: 控制面板——管理工具——服务——VisualSVN Server——鼠标右键——属性——登录——选择“本地系统账

IE浏览器JS提示缺少对象的解决办法

前端文件中写了一个AJAX取城市列表的JS方法.一个检测表单输入的JS方法,还有一些其它的JS代码. 整个页面代码在chrome和火狐浏览器下一切正常.但是在IE浏览器下在取城市列表的JS方法中提示缺少对象,这个不太具体的报错一开始就让我头疼,因为在chrome等浏览器中是可以运行的,所以初步估计是代码冲突,于是一段代码,一段代码的删,搞了一个小时,发现问题出在检查表单的JS方法里: 表单中有一个选择产品分类的下拉框,这个下拉框的name和ID都定义为:class ,然后在检查表单的JS方法里取

ubuntu下apache虚拟主机出现forbidden错误的解决办法

交换两个变量:例如num1=5,num2=6→num1=6,num=5 怎么样?是不是觉得灰常简单,你是不是用下面的方法做的: int num1=5: int num2=6: int temp=num1: num1=num2; num2=temp; Console.WriteLine("num1={0},num2={1}",num1,num2); 好吧!你赢了!你做的非常对!就就是所谓的值传递 声明一个中间变量temp!没有可说的!大家都懂的! 接着我们来看下面这个比较犀利的出题人: