Ubuntu sudo apt-get update提示 Failed to fetch,解决办法
问题:
执行sudo apt-get update提示:Failed to fetch
chen@ubuntu:~/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 InReleaseClearsigned 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
提示如下:
guchen@ubuntu:~/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 InReleaseClearsigned 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
guchen@ubuntu:~/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
终于搞定啦
备注:
最好把DNS设置一下
sudo vi /etc/resolv.conf
在里面添加
nameserver 8.8.8.8
重启网络服务
sudo service networking restart
转载于:https://www.cnblogs.com/gcgc/p/10131617.html
Ubuntu sudo apt-get update提示 Failed to fetch,解决办法相关推荐
- Ubuntu字符界面输入密码始终提示错误 login incorrect 解决办法
方法1. 先输入用户名按enter,然后ctrl+alt+f7 切换回图形界面,然后再切换到字符界面输密码 方法2.先输入用户名按enter,然后关闭小键盘上的numlock按键再打开,再输入密码 f ...
- TLinux:执行sudo apt install gcc提示“软件包gcc没有可安装候选”
Linux:执行sudo apt install gcc提示"软件包gcc没有可安装候选 解决方法: 在虚拟机设置中把网络改成桥连接然后执行sudo apt-get update,下载好在执 ...
- 修改mysql字符编码出现Job failed to start解决办法
修改mysql字符编码出现Job failed to start解决办法 在python mange.py shell下填充MySQL数据库的时候,发现汉字不能输入. 于是要修改一下MySQL数据库编 ...
- Ubuntu连接以太网时显示“设备未托管”的解决办法
Ubuntu连接以太网时显示"设备未托管"的解决办法 故障分析: 电脑之前可能设置过PPOE(有线宽带虚拟拨号),常见为连接校园拨号宽带. 解决办法: 第一步:打开终端 第二步:切 ...
- ubuntu进入终端界面输入密码错误login incorrect的解决办法
在给ubuntu系统安装nvidia驱动时,会禁用图像界面服务.这时候进入终端界面时会要求输入登录账号密码.然而有的人可能在输入密码时总提示密码不正确或无法登录. 这里排除密码输错的情况.介绍另一种导 ...
- ubuntu安装软件失败无法安装其他软件的解决办法
安装有道失败后无法安装其他软件: root@***:~# sudo apt install net-tools 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 ...
- python错误2503_Win10卸载python总是提示error2503失败各种解决办法
最近win10的电脑装了python的3.4,然后想卸载,就总是提示error 2053,类似于这种: 下面是我的坎坷解决之路: 1.网上说,任务管理器 --> 详细信息 --> expl ...
- 错误代码0x800700d8php,win10系统更新补丁KB4338819出错提示0x800700d8错误代码的解决办法?...
win10系统更新补丁KB4338819出错提示0x800700d8错误代码的解决办法?? 微软近期像向所有win10 1803版本操作系统的用户们推送了KB4338819补丁,但是有许多win10系 ...
- vs2005部署报表服务器项目老提示输入用户名密码解决办法
vs2005部署报表服务器项目老提示输入用户名密码解决办法 按书上的步骤,用SQL Server Business Intelligence Development Studio建好的 .rdl格式的 ...
最新文章
- AS3.0函数定义的方法
- pycharm 怎么对代码进行性能分析,消耗时间time (Run -- Profile 'xxxx')
- Django路由系统
- C++的ORM工具比较
- as3 转义html,html和xml中的转义字符在Flash as3中的用法浅析
- Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My
- Javamysql语法转化oracle_MySQL到Oracle语法错误(限制/偏移/更新)
- Python pycharm(windows版本)部署spark环境
- java中递归与回调函数_如何将递归回调函数转换为异步等待格式
- 1.4补充 三态缓存(tristate buffer)与 多路复用器(Multiplexers)
- 倾斜模型精细化处理_无人机倾斜影像三维建模中的模型精细化
- Unity MVC实现背包系统(2)
- Centos 7下PCIe Bus Error: severity=Corrected, type=Data Link Layer解决方案
- Ubuntu如何发音
- 正版授权|FastStone Image Viewer 图像编辑转换浏览器软件,个人免费的图像浏览器、转换器和编辑器。
- ThinkPad W500 在WINDOWS8.1系统下安装双显卡的方法
- 华为云:推动从业务上云到云上创新的跨越
- java 获取对象属性值为空或者非空的属性名称
- 澳洲社区宜居指数:首都第一西澳垫底
- linux+scp+失败_Linux scp 命令卡住的原因
热门文章
- 【XRT Vitis-Tutorials】图像并行计算
- 关于学习中国大学MOOC国家精品课程《计算机程序设计C++》的学习记录与小结
- 64位系统控件注册方法
- DevExpress 文本控件
- Unity中的Invoke
- 【生活指南】我的未来我做主
- R语言计算累积平均值(Cumulative Average)、使用cumsum函数和seq_along函数计算data.frame指定数据列的累积平均值、并添加累积平均值数据列
- 北邮和西电真的厉害,看到许多985的喊0 offer,同时也看到一大堆北邮西电的人秀出高薪offer...
- es6 字符串模板拼接
- 高效智能档案管理软件