Lin*_*bie 6 apt repository software-sources
我正在浏览Repository files并在文件/etc/apt/sources.list中看到这些行:
deb http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
Run Code Online (Sandbox Code Playgroud)
其中,我明白
http://ppa.launchpad.net/elementary-os/stable/ubuntu
Run Code Online (Sandbox Code Playgroud)
是 apt-get 从中检索文件的地方,但我无法理解其中其余单词的含义。这些词是deb, deb-src, xenial main, stable main, trusty main。
编辑:另外,我在访问此站点时发现了这些行,并注意到了 URL[arch=amd64]之间deb的内容。
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/chrome.list
Run Code Online (Sandbox Code Playgroud)
所以,这里的问题是:
sources.list档案里的这些字是什么意思?
deb
deb-src
xenial main
stable main
trusty main
Run Code Online (Sandbox Code Playgroud)还有,什么[arch=amd64]意思?
C0d*_*lus 10
您的问题围绕着源列表文件的语法或格式,该文件描述了其他程序是什么、如何以及从何处获取源。所以,这里是:
A先进适用package tOOL)用于管理 Debian 和基于 Debian (Ubuntu) 系统上的存储库。它使用一个文件,列出Repository Sources应该和可以从哪里获得包。该文件还列出了应如何获取包以及从哪些子包(或套件)中获取包。
实体的书写格式告诉一切都适合。但是,格式有两种变体。
.listall version of apt.例子 :
deb http://security.debian.org stretch/updates main contrib non-free
Run Code Online (Sandbox Code Playgroud).sourcessince version 1.1fieldname : value.例子 :
Types: deb
URIs: http://deb.debian.org/debian
Suites: stretch
Components: main contrib non-free
Run Code Online (Sandbox Code Playgroud)因为你可以从deb822-style format你问的那些词中得到一个想法。让我们深入了解格式的更多细节。
deb或deb-src, 表示存档类型。deb 表示存档包含二进制包 (deb),即我们通常使用的预编译包。deb-src表示源包,即原始程序源加上Debian control files (.dsc)包含程序打包所需更改的 diff.gz 和 diff.gz。它只是一个指向您想要从中获取包的源存储库的 URL/URI。您可以为 URL/URI 指定类型,该类型可以是当前识别的 URI 中的任何人:
http | https | file | cdrom | ftp | copy | rsh,ssh
Run Code Online (Sandbox Code Playgroud)
如果需要,您可以添加更多可识别的 URI 类型。
套件是指分布的两个属性的组合,它们是:
发布代号
每个操作系统版本的别名。每个操作系统都有一个代号 ,您现在已经知道如何获得发行版的完整代号?
发布类
定义包的开发阶段,可以是以下之一或组合:
stable testing unstable
Run Code Online (Sandbox Code Playgroud)组件告诉包是否是:
main)或在其他地方有依赖关系(如contrib)。main或restricted或universe或multiverse。将EDIT part你的问题指的是什么被称为选项。顾名思义,它们是可选的,但在使用时,它们会修改源条目以获取特定类型的包。他们可以定义:
要为其获取包的体系结构。正如您在编辑部分引用的源条目中的选项一样:
"[arch=amd64]"
Run Code Online (Sandbox Code Playgroud)特定语言
一行式格式
[archive-type] [ option1=value1,option2=value2 ] URI suite [component1] [component2] [...]
Run Code Online (Sandbox Code Playgroud)deb822 风格的格式
Types: deb deb-src
URIs: uri
Suites: suite
Components: [component1] [component2] [...]
option1: value1
option2: value2
Run Code Online (Sandbox Code Playgroud)随意添加更多详细信息。
| 归档时间: |
|
| 查看次数: |
4692 次 |
| 最近记录: |