Я добавил репо, поместив файл в
/etc/apt/sources.list.d
, а затем я сделал
apt-get update.
Однако он ничего не сделал с этим репо. Затем я заметил, что он не включает репозитории в этом каталоге. Похоже, 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
Нужно ли поместить какой-то оператор включения в /etc/apt/sources.list?
Я использую Kubuntu 11.10.
Таким образом, проблема, похоже, заключалась в том, что у меня был установлен пакет из одного из обычных репозиториев apt, и я хотел, чтобы он обновился до версии из одного из новых репозиториев. Видимо, это невозможно. Мне пришлось удалить пакеты, о которых идет речь, а затем установить все закомментированные обычные репозитории. Я все еще не уверен, почему, когда вы делаете обновление apt-get, ни у одного из этих новых репозиториев не отображаются свои URL.
Названия файлов в /etc/sources.list.d
должен закончиться в .list
, если они должны быть включены как источники программного обеспечения.
Поскольку в странице справочника sources.list говорится:
ОПИСАНИЕ
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 #.
SOURCES.LIST.D
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.
При взятии примера от этой страницы предположите, что Вы хотели установить шеф-повара (от opscode), что Вы сделаете:
opscode.list
:sudo 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'
Примечание: Команда содержит onereic
потому что кодовым названием Ubuntu, которую Вы используете, является Onereic. Вы использовали Точный (12.04), у Вас было бы устройство записи precise
.