How to fix the sources list
How to fix the sources list
Sometimes the apt-get may not work, it is often caused by the misspelled sources list. In most cases, you can fix it by yourself.
In this guide, I will tell you where is sources list, and how to fix it.
WHERE IS SOURCES LIST
Sources list is located at “/etc/apt/” (File System->etc->apt), the main sources list is “sources.list”. And there will be other sources list under /etc/apt/sources.list.d/, all valid list should be end with “.list”.
HOW DOES SOURCES LIST LOOK LIKE
If you open your sources.list, a typical line will look like this:
deb http://archive.ubuntu.com/ubuntu natty main restricted
It is called an “Entry”, sources list is consists of a numbers of entries.
Every entry is made by four sections, these sections are separated by “space”. I used different color to distinguish difference sections.
The first section is represent the “Entry type”. “deb” means the list contains deb packages. Another value is “deb-src”, it means the deb packages’ source code.
The second section is the URL, it must be accessible.
The third is distribution code name, it depends on your current distribituion.
The forth section is the “components”, it can be several items.
So a complete and valid source entry will look like this:
Type: must be “deb” or “deb-src”
URL: must be an accessible url
Code name: “karmic”, “lucid”, “maverick” or ther Ubuntu code names.
Component name: if the entry is PPA, so it will always be “main”.
Now you know how to fix the sources list! Open your terminal, try to edit and correct it with root like this:
sudo gedit /etc/apt/sources.list (or other path)
If you have any other problem, please leave a comment to let me know.
How to fix the sources list的更多相关文章
- How to fix “Duplicate sources.list entry …” issue
The correct format of repository source line is <type of repository> <location> <di ...
- Ubuntu 14.04.4官方默认更新源sources.list
Ubuntu 14.04.4官方默认更新源sources.list # deb cdrom:[Ubuntu LTS _Trusty Tahr_ - Release amd64 (20160217.1) ...
- 关于ubuntu的sources.list总结
一.作用 文件/etc/apt/sources.list是一个普通可编辑的文本文件,保存了ubuntu软件更新的源服务器的地址.和sources.list功能一样的是/etc/apt/sources. ...
- [转] 关于ubuntu的sources.list总结
点击阅读原文 一.作用 文件/etc/apt/sources.list是一个普通可编辑的文本文件,保存了ubuntu软件更新的源服务器的地址.和sources.list功能一样的是/etc/apt/s ...
- 【转】关于Ubuntu的sources.list 的总结
一.作用 文件/etc/apt/sources.list是一个普通可编辑的文本文件,保存了ubuntu软件更新的源服务器的地址.和sources.list功能一样的是/etc/apt/sources. ...
- Ubuntu14.04和16.04官方默认更新源sources.list和第三方源推荐(干货!)
不多说,直接上干货! 写在前面:笔者由于还在学校学习,学校没有开发给Linux用的上网客户端,所以只能用在windows系统中通过安装虚拟机运行linux比较方便,但没有外网,只有学校的教育网,所以我 ...
- buntu14.04和16.04官方默认更新源sources.list和第三方源推荐(干货!)转
配置完成后: sudo apt-get update 安装和删除软件: sudo apt-get install sudo apt-get remove buntu14.04和16.04官方默认更新源 ...
- 【转】stropts.h: No such file or directory – How to Fix
原文地址:stropts.h: No such file or directory – How to Fix 作者:xjc2694 It is a known issue that modern Li ...
- Could not find modernizr-2.6.2 in any of the sources GitLab: API is not accessible
Could not find modernizr-2.6.2 in any of the sources GitLab: API is not accessible bundle exec rake ...
随机推荐
- 省选模拟赛 project
solution: 最小割问题. 建如下边: (S,i,Ai)代表选用A语言编写第i个项目: (i,T,Bi)代表选用A语言编写第i个项目: 其后注意要反向连边 (i,j,D)代表选用B语言编写第i个 ...
- JS常用方法函数整理
1.document.write("");为输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是:document->html->(head,body) 4. ...
- C#输出log信息
在写程序的过程中,有时候我们需要添加一些log信息,这个时候,可以采用下面的方法来实现. public static void WriteLog(string ExtraMsg, Exception ...
- Linux常用命令笔记
~ 我的home目录/ 系统根目录进入home目录:cd \进入跟目录:cd /Maven编译:mvn clean deploy -U -Dmaven.test.skip=true dependenc ...
- 转:小白编译openwrt固件教程
原文地址 编译openwrt固件并没有想象的那么复杂,我也是个小白,以下内容是我将网络上的编译教程稍微进行了一下整合.因为我发现很多编译教程没有说明如何更改flash相关配置. 安装ubuntu, ...
- Android各种屏幕适配原理
dip(dp): device independent pixels(设备独立像素) dip,就是把屏幕的高分成480分,宽分成320分.比如你做一条160dip的横线,无论你在320还480的模拟器 ...
- flask+sqlite3+echarts2+ajax数据可视化--静态图
结构: /www | |-- /static | | | |-- echarts.js(当然还有echarts原dist目录下的文件(夹)) | |-- /templates | | | |-- in ...
- CUDA2.2-原理之存储器访问
本小节来自<大规模并行处理器编程实战>第四节,该书是很好的从内部原理结构上来讲述了CUDA的,对于理解CUDA很有帮助,借以博客的形式去繁取间,肯定会加入自己个人理解,所以有错误之处还望指 ...
- bash中变量+=,if大小判断,随机休眠
#!/bin/bash index= while true;do echo "hello" (( index+=)) echo `date "+%H:%M:%S" ...
- 用程序集编写clr表值函数:把正则表达式引入数据库中
正则表达式非常好,但在数据库中就是没有,但可以通过程序集方式扩展 先编写一个dll,标量函数很好写,表值函数麻烦一点 下面是C#代码 using System; using System.Data; ...