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 ...
随机推荐
- NOI2004 郁闷的出纳员
Description OIER公司是一家大型专业化软件公司,有着数以万计的员工.作为一名出纳员,我的任务之一便是统计每位员工的工资.这本来是一份不错的工作,但是令人郁闷的是,我们的老板反复无常,经常 ...
- eclipse无法导入Android工程的现象与解决办法
最近在新导入一个Android工程时遇见了已有工程无法导入的情况.具体的现象就是每次导入时的导入窗口很快消失,而在eclipse的package explorer中却没有增加新导入的工程文件夹,没有其 ...
- ADB server didn't ACK 问题解决
在命令行中运行adb shell 出现如下错误提示 C:\Documents and Settings\Administrator>adb shelladb server is out of d ...
- HTML 学习笔记(块 和 类)
HTML <div> 和 <span> 可以通过<div>和<span>将HTML元素组合起来. HTML块元素 大多数HTML元素被定义为块级元素或者 ...
- ONS C++ Windows SDK 调试方法及注意事项
此文将展示ONS C++ Windows SDK 整个调试过程,笔者直接使用sdk包中的example消息发送示例代码,开发环境为win7, 64位,Visual Studio Professiona ...
- swift三方库
链接: Swift 有哪些优秀的第三方库? Swift 中AFNetworking 的替代方案 Alamofire Swift2.0后Alamofire的使用方法 [快速学会Swift第三方库] Al ...
- Java手动添加SSL证书
出现错误为 SSLHandshakeException - unable to find valid certification path to requested target 在服务器上找到对应的 ...
- 柯里化/偏函数/Curring用法
把接受多个参数的函数变成一个单一参数的函数,并且返回接受余下的参数而有返回结果的新函数的技术 下面我们以实例说明: var toString = {}.toString; var isString = ...
- weblogic.nodemanager.common.ConfigException: Native version is enabled but nodemanager native library could not be loaded 解决办法
近日在一个原本工作正常的weblogic web server(操作系统为redhat 64位系统)上折腾安装redis/hadoop等东东,yum install了一堆第3方类库后,重启weblog ...
- NetFPGA
From Wikipedia, the free encyclopedia The NetFPGA project[1] is an effort to develop open source har ...