我通过放入一个文件添加了一个 repo
/etc/apt/sources.list.d
Run Code Online (Sandbox Code Playgroud)
然后我做了一个
apt-get update.
Run Code Online (Sandbox Code Playgroud)
但是它没有对那个回购做任何事情。然后我注意到它似乎没有包含该目录中的任何存储库。apt-get 似乎只注意到 /etc/apt/sources.list 中的内容。目录中的所有文件都以 .list 结尾并包含以下内容:
virtualbox.list
deb http://download.virtualbox.org/virtualbox/debian oneiric contrib
pj-assis-ppa-oneiric.list
deb http://ppa.launchpad.net/pj-assis/ppa/ubuntu oneiric main
deb-src http://ppa.launchpad.net/pj-assis/ppa/ubuntu oneiric main
Run Code Online (Sandbox Code Playgroud)
我是否需要在 /etc/apt/sources.list 中放入某种包含语句?
我正在使用 kubuntu 11.10。
gre*_*een 11
如果要包含在软件源/etc/sources.list.d中.list,文件名必须以 结尾。
正如sources.list的手册页所说:
描述
Run Code Online (Sandbox Code Playgroud)The package resource list is used to locate archives of the package distribution system in use on the system. At this time, this manual page documents only the packaging system used by the Debian GNU/Linux system. This control file is /etc/apt/sources.list. The source list is designed to support any number of active sources and a variety of source media. The file lists one source per line, with the most preferred source listed first. The format of each line is: type uri args The first item, type determines the format for args. uri is a Universal Resource Identifier (URI), which is a superset of the more specific and well-known Universal Resource Locator, or URL. The rest of the line can be marked as a comment by using a #.来源.列表.D
Run Code Online (Sandbox Code Playgroud)The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. The format is the same as for the regular sources.list file. File names need to end with .list and may only contain letters (a-z and A-Z), digits (0-9), underscore (_), hyphen (-) and period (.) characters. Otherwise APT will print a notice that it has ignored a file if the file doesn't match a pattern in the Dir::Ignore-Files-Silently configuration list - in this case it will be silently ignored.
以本页为例,假设您想安装Chef (from opscode),您要做的是:
opscode.list:须藤vim /etc/apt/sources.list.d/opscode.list
deb http://apt.opscode.com/ oneiric main
以上步骤可以组合成一个命令:
sudo /bin/sh -c 'echo "deb http://apt.opscode.com/ onereic main" > /etc/apt/sources.list.d/opscode.list'
Run Code Online (Sandbox Code Playgroud)
注意:该命令包含,onereic因为您使用的 Ubuntu 的代号是Onereic。如果你一直在使用Precise (12.04),你就会有 .writter precise。
所以问题似乎是我从普通 apt 存储库之一安装了一个软件包,并且我希望它使用新存储库之一的版本进行更新。显然这是不可能的。我必须卸载有问题的软件包,然后安装所有正常的存储库并注释掉。我仍然不确定为什么当您执行 apt-get 更新时,这些新存储库都没有显示其网址。
| 归档时间: |
|
| 查看次数: |
31090 次 |
| 最近记录: |