博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to fix the sources list
阅读量:5336 次
发布时间:2019-06-15

本文共 1704 字,大约阅读时间需要 5 分钟。

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 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.

转载于:https://www.cnblogs.com/liuhui0622/p/4703273.html

你可能感兴趣的文章
Web服务器的原理
查看>>
小强升职计读书笔记
查看>>
常用的107条Javascript
查看>>
#10015 灯泡(无向图连通性+二分)
查看>>
忘记root密码,怎么办
查看>>
linux设备驱动归纳总结(三):1.字符型设备之设备申请【转】
查看>>
《黑客与画家》 读书笔记
查看>>
bzoj4407: 于神之怒加强版
查看>>
mysql统计一张表中条目个数的方法
查看>>
ArcGIS多面体(multipatch)解析——引
查看>>
css3渐变画斜线 demo
查看>>
JS性能DOM优化
查看>>
设计模式 单例模式 使用模板及智能指针
查看>>
c#的const可以用于引用类型吗
查看>>
手动实现二值化
查看>>
What Linux bind mounts are really doing
查看>>
linux top命令详解
查看>>
博弈论小结
查看>>
模拟Post登陆带验证码的网站
查看>>
NYOJ458 - 小光棍数
查看>>