特殊:Badtitle/NS100:Repositories/Ubuntu:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/Repositories/Ubuntu}} | {{From|https://help.ubuntu.com/community/Repositories/Ubuntu}} | ||
{{Languages|UbuntuHelp:Repositories/Ubuntu}} | {{Languages|UbuntuHelp:Repositories/Ubuntu}} | ||
[[Anchor(what)]] | [[Anchor(what)]] | ||
=== What are Repositories? === | === What are Repositories? === | ||
There are thousands of programs available to install on Ubuntu. These programs are stored in software archives ''(repositories)'' and are available for installation over the Internet. This makes it very easy to install new programs. It is also very secure, because each program you install is thoroughly tested and built specifically for Ubuntu. | There are thousands of programs available to install on Ubuntu. These programs are stored in software archives ''(repositories)'' and are available for installation over the Internet. This makes it very easy to install new programs. It is also very secure, because each program you install is thoroughly tested and built specifically for Ubuntu. | ||
The Ubuntu software repository is organised into four "components", on the basis of the level of support Ubuntu can offer them, and whether or not they comply with Ubuntu's [http://www.ubuntu.com/ubuntu/philosophy Free Software Philosophy]. The components are called '''Main''' (officially supported software), '''Restricted''' (supported software that is not available under a completely free license), '''Universe''' (community-maintained, i.e. not officially supported software) and '''Multiverse''' (software that is "not free"). You can find more information about the Ubuntu Repositories [http://www.ubuntu.com/ubuntu/components here]. | The Ubuntu software repository is organised into four "components", on the basis of the level of support Ubuntu can offer them, and whether or not they comply with Ubuntu's [http://www.ubuntu.com/ubuntu/philosophy Free Software Philosophy]. The components are called '''Main''' (officially supported software), '''Restricted''' (supported software that is not available under a completely free license), '''Universe''' (community-maintained, i.e. not officially supported software) and '''Multiverse''' (software that is "not free"). You can find more information about the Ubuntu Repositories [http://www.ubuntu.com/ubuntu/components here]. | ||
The Ubuntu Install CDs contain software from the '''Main''' and '''Restricted''' components. Once your system is made aware of the Internet-based locations for these repositories, many more software programs are made available for installation. Using the software package management tools already installed on your system, you can search for, install and update any piece of software directly over the Internet, without the need for the CD. | The Ubuntu Install CDs contain software from the '''Main''' and '''Restricted''' components. Once your system is made aware of the Internet-based locations for these repositories, many more software programs are made available for installation. Using the software package management tools already installed on your system, you can search for, install and update any piece of software directly over the Internet, without the need for the CD. | ||
<br> | <br> | ||
=== Adding Repositories in Ubuntu === | === Adding Repositories in Ubuntu === | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png This page describes how to manage software repositories in '''Ubuntu 6.10 (Edgy Eft)''' and '''Ubuntu 6.06 (Dapper Drake)'''. For '''Kubuntu''' please see [[UbuntuHelp:Repositories/Kubuntu| Kubuntu repository management]]. For '''earlier versions of Ubuntu''' please see [[UbuntuHelp:Repositories/Ubuntu/Breezy| this wiki page]]. | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png This page describes how to manage software repositories in '''Ubuntu 6.10 (Edgy Eft)''' and '''Ubuntu 6.06 (Dapper Drake)'''. For '''Kubuntu''' please see [[UbuntuHelp:Repositories/Kubuntu| Kubuntu repository management]]. For '''earlier versions of Ubuntu''' please see [[UbuntuHelp:Repositories/Ubuntu/Breezy| this wiki page]]. | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=terminal.png The operations described on this page modify the software repositories configuration file located at | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=terminal.png The operations described on this page modify the software repositories configuration file located at | ||
<pre><nowiki> | <pre><nowiki> | ||
/etc/apt/sources.list </nowiki></pre> | /etc/apt/sources.list </nowiki></pre> | ||
Software sources can also be managed by making direct modifications to this file using the command line. If you prefer to use the command line instead of a graphical user interface, see [[UbuntuHelp:../CommandLine| Managing Repositories from the Command Line]] instead. | Software sources can also be managed by making direct modifications to this file using the command line. If you prefer to use the command line instead of a graphical user interface, see [[UbuntuHelp:../CommandLine| Managing Repositories from the Command Line]] instead. | ||
<br> | <br> | ||
=== Adding the Universe and Multiverse Repositories === | === Adding the Universe and Multiverse Repositories === | ||
<br> | <br> | ||
* Navigate to "System" > "Administration" > "Software Properties". You will have to enter your password here. | * Navigate to "System" > "Administration" > "Software Properties". You will have to enter your password here. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=menu-sw.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=menu-sw.png | ||
* A list of repositories or "Channels" will be shown. Select "Ubuntu 6.06 LTS (source)" from the list (should be the first one), click "Add...", select "non-free (multiverse)" and "community maintained (universe)" by clicking their check boxes. Now click the "add" button. | * A list of repositories or "Channels" will be shown. Select "Ubuntu 6.06 LTS (source)" from the list (should be the first one), click "Add...", select "non-free (multiverse)" and "community maintained (universe)" by clicking their check boxes. Now click the "add" button. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=activating-repos.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=activating-repos.png | ||
* Click '''Close''' to save your changes. A dialog box should appear, asking whether you'd like to update the list of repositories. Click '''Reload''' to apply your changes. | * Click '''Close''' to save your changes. A dialog box should appear, asking whether you'd like to update the list of repositories. Click '''Reload''' to apply your changes. | ||
<br> | <br> | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png '''Integration with Synaptic Package Manager''' | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png '''Integration with Synaptic Package Manager''' | ||
* The next time you use the '''Synaptic''' package manager, click on the '''Reload''' button to make it aware of the new software repositories. | * The next time you use the '''Synaptic''' package manager, click on the '''Reload''' button to make it aware of the new software repositories. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=reload.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=reload.png | ||
* You can also manage software repositories from within '''Synaptic''' by selecting "Settings" > "Repositories". | * You can also manage software repositories from within '''Synaptic''' by selecting "Settings" > "Repositories". | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=synaptic-repos.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=synaptic-repos.png | ||
<br> | <br> | ||
=== Adding Canonical Commercial Repositories === | === Adding Canonical Commercial Repositories === | ||
To launch the Synaptic Package Manager hit '''''System -> Administration -> Synaptic Package Manager''''' . | To launch the Synaptic Package Manager hit '''''System -> Administration -> Synaptic Package Manager''''' . | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu01.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu01.png | ||
Next you will be prompted for your password to be able to launch Synaptic as super user. | Next you will be prompted for your password to be able to launch Synaptic as super user. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu02.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu02.png | ||
Once that's all done you should now have the Synaptic package manager on your screen. On the menu of this screen you will want to click on '''''Settings -> Repositories''''' | Once that's all done you should now have the Synaptic package manager on your screen. On the menu of this screen you will want to click on '''''Settings -> Repositories''''' | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu03.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu03.png | ||
This is were you will be able to add the Canonical commercial repositories. on the left of the screen click on the button '''''Add'''''. | This is were you will be able to add the Canonical commercial repositories. on the left of the screen click on the button '''''Add'''''. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu04.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu04.png | ||
The Add Channel screen will come up. On this screen select the Custom option. | The Add Channel screen will come up. On this screen select the Custom option. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu05.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu05.png | ||
On this screen type the following line and then click on '''''Add Channel'''''. | On this screen type the following line and then click on '''''Add Channel'''''. | ||
''''' deb <code><nowiki>http://archive.canonical.com/ubuntu</nowiki></code> feisty-commercial main ''''' | ''''' deb <code><nowiki>http://archive.canonical.com/ubuntu</nowiki></code> feisty-commercial main ''''' | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu06.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=RepositoriesUbuntu06.png | ||
Now hit '''''Close'''''. From the main Synaptic window, hit '''''Reload'''''. Once this finishes, you will now be able to get packages from the Canonical commercial repositories using the Synaptic Package Manager. | Now hit '''''Close'''''. From the main Synaptic window, hit '''''Reload'''''. Once this finishes, you will now be able to get packages from the Canonical commercial repositories using the Synaptic Package Manager. | ||
<br> | <br> | ||
[[Anchor(other)]] | [[Anchor(other)]] | ||
=== Adding Other Repositories === | === Adding Other Repositories === | ||
<br> | <br> | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png '''Note:''' There are some (but not many) good reasons for which you might want to add non-Ubuntu repositories to your list of software sources. For example, some software cannot be distributed by Ubuntu due to patent and licensing restrictions in some countries (see the RestrictedFormats page for examples). You might want to add repositories that offer such software. Make sure that '''all''' repositories you add in this way have been tested and are known to work on Ubuntu systems. Repositories that are not designed to work with your version of Ubuntu can introduce inconsistencies in your system and might force you to re-install. | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png '''Note:''' There are some (but not many) good reasons for which you might want to add non-Ubuntu repositories to your list of software sources. For example, some software cannot be distributed by Ubuntu due to patent and licensing restrictions in some countries (see the RestrictedFormats page for examples). You might want to add repositories that offer such software. Make sure that '''all''' repositories you add in this way have been tested and are known to work on Ubuntu systems. Repositories that are not designed to work with your version of Ubuntu can introduce inconsistencies in your system and might force you to re-install. | ||
---- | ---- | ||
<br> | <br> | ||
[[Anchor(add)]] | [[Anchor(add)]] | ||
You can add custom software repositories by adding the '''apt repository line''' of your software source to the list of repositories. To do so, click on the '''Add''' button next to the Channel list in the Software Preferences panel, then select '''Custom'''. | You can add custom software repositories by adding the '''apt repository line''' of your software source to the list of repositories. To do so, click on the '''Add''' button next to the Channel list in the Software Preferences panel, then select '''Custom'''. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=add-custom.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=add-custom.png | ||
[[Anchor(aptline)]] | [[Anchor(aptline)]] | ||
* Enter the apt line into the dialog box. It should look something like this: | * Enter the apt line into the dialog box. It should look something like this: | ||
<pre><nowiki> | <pre><nowiki> | ||
deb http://mirror3.ubuntulinux.nl/ dapper-seveas freenx </nowiki></pre> | deb http://mirror3.ubuntulinux.nl/ dapper-seveas freenx </nowiki></pre> | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png For an explanation of the different parts of the apt line, see the [[edit Editing Repositories]] section below. | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png For an explanation of the different parts of the apt line, see the [[edit Editing Repositories]] section below. | ||
<br> | <br> | ||
=== Managing Local Repositories === | === Managing Local Repositories === | ||
==== Disable the CD-ROM Repository ==== | ==== Disable the CD-ROM Repository ==== | ||
If you have installed Ubuntu from one of Ubuntu's CD-ROMs, the CD will be included in the list of repositories used by the package managment tools. When you install a new package, '''Synaptic''' will check whether the package is available locally (i.e. on the CD-ROM). '''Synaptic''' may then ask for the CD-ROM. This can help reduce the size of downloads and speed up the installation process. If you would like '''Synaptic''' to rely solely on the internet repositories for package management, you can disable the CD-ROM entry with a few steps: | If you have installed Ubuntu from one of Ubuntu's CD-ROMs, the CD will be included in the list of repositories used by the package managment tools. When you install a new package, '''Synaptic''' will check whether the package is available locally (i.e. on the CD-ROM). '''Synaptic''' may then ask for the CD-ROM. This can help reduce the size of downloads and speed up the installation process. If you would like '''Synaptic''' to rely solely on the internet repositories for package management, you can disable the CD-ROM entry with a few steps: | ||
* Launch Synaptic and navigate to "Settings" > "Repositories". <br> A list of software repositories or "Channels" will be shown. | * Launch Synaptic and navigate to "Settings" > "Repositories". <br> A list of software repositories or "Channels" will be shown. | ||
* Locate the entry for the CD-ROM (it may say something like '''CD disk with Ubuntu 6.06 LTS'''). Click on the checkbox next to it to disable the CD-ROM as a software source. | * Locate the entry for the CD-ROM (it may say something like '''CD disk with Ubuntu 6.06 LTS'''). Click on the checkbox next to it to disable the CD-ROM as a software source. | ||
* Click the '''Close''' button to save the changes you have made. | * Click the '''Close''' button to save the changes you have made. | ||
* You can re-enable the CD-ROM at any time using the checkbox next to its entry. | * You can re-enable the CD-ROM at any time using the checkbox next to its entry. | ||
<br> | <br> | ||
=== Removing Repositories === | === Removing Repositories === | ||
To remove software sources ("Channels") from the list, select the source and click on the '''Remove''' button. (If you only want to disable the repository temporarily, uncheck the checkbox next to the source instead.) | To remove software sources ("Channels") from the list, select the source and click on the '''Remove''' button. (If you only want to disable the repository temporarily, uncheck the checkbox next to the source instead.) | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png Use with caution: At present, you will not be asked to confirm the remove action. This is not a problem with the Ubuntu repositories as you can simply [[add add them again]], but you may have to look up a custom repository line if you mistakenly delete it. (It is always a good idea to back up your sources.list) | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png Use with caution: At present, you will not be asked to confirm the remove action. This is not a problem with the Ubuntu repositories as you can simply [[add add them again]], but you may have to look up a custom repository line if you mistakenly delete it. (It is always a good idea to back up your sources.list) | ||
<br> | <br> | ||
[[Anchor(edit)]] | [[Anchor(edit)]] | ||
=== Editing Repositories === | === Editing Repositories === | ||
To make changes to a software source, select it in the list and click the '''Edit''' button. A dialog box displays the apt line, broken up into its components. | To make changes to a software source, select it in the list and click the '''Edit''' button. A dialog box displays the apt line, broken up into its components. | ||
https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=edit-channel.png | https://help.ubuntu.com/community/Repositories/Ubuntu?action=AttachFile&do=get&target=edit-channel.png | ||
* '''Type''' Software sources may contain software in '''binary''' or '''source code''' format. Select the option that corresponds to the repository. | * '''Type''' Software sources may contain software in '''binary''' or '''source code''' format. Select the option that corresponds to the repository. | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png The corresponding apt line has '''deb''' for binary repositories and '''deb-src''' for source code repositories. | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png The corresponding apt line has '''deb''' for binary repositories and '''deb-src''' for source code repositories. | ||
<br> | <br> | ||
* '''URI''' Enter a valid Uniform Resource Indicator or URI for the software repository. Here's a list of examples: | * '''URI''' Enter a valid Uniform Resource Indicator or URI for the software repository. Here's a list of examples: | ||
** '''cdrom''' <br> | |||
<pre><nowiki> | <pre><nowiki> | ||
cdrom:[description_of_cd]/ </nowiki></pre> | cdrom:[description_of_cd]/ </nowiki></pre> | ||
* '''ftp''' <br> | |||
<pre><nowiki> | <pre><nowiki> | ||
ftp://ftp.domain.ext/path/to/repository </nowiki></pre> | ftp://ftp.domain.ext/path/to/repository </nowiki></pre> | ||
* '''http''' <br> | |||
<pre><nowiki> | <pre><nowiki> | ||
http://www.domain.ext/path/to/repository </nowiki></pre> | http://www.domain.ext/path/to/repository </nowiki></pre> | ||
* '''smb''' (works only when the computer is connected to a Samba share) <br> | |||
<pre><nowiki> | <pre><nowiki> | ||
smb://path/to/repository </nowiki></pre> | smb://path/to/repository </nowiki></pre> | ||
* '''nfs''' (works only if the computer is connected to a NFS share) <br> | |||
<pre><nowiki> | <pre><nowiki> | ||
file://path/to/local/directory </nowiki></pre> | file://path/to/local/directory </nowiki></pre> | ||
<br> | <br> | ||
* '''Distribution''' <br> Select the name of the distribution or the name of the distribution version. <br>(''dapper-seveas'' [[aptline in the example above]].) | * '''Distribution''' <br> Select the name of the distribution or the name of the distribution version. <br>(''dapper-seveas'' [[aptline in the example above]].) | ||
<br> | <br> | ||
* '''Components''' <br> Select the repository section to access. Add more sections separated by spaces. <br>(The [[aptline example repository]] has a ''freenx'' section.) | * '''Components''' <br> Select the repository section to access. Add more sections separated by spaces. <br>(The [[aptline example repository]] has a ''freenx'' section.) | ||
<br> | <br> | ||
* '''Comment''' <br>Add a comment to describe the repository for easier reference. | * '''Comment''' <br>Add a comment to describe the repository for easier reference. | ||
<br> | <br> | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png Repositories defined using the '''Software Preferences''' panel are available to '''Update-Manager''' and will be periodically checked for updates. | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png Repositories defined using the '''Software Preferences''' panel are available to '''Update-Manager''' and will be periodically checked for updates. | ||
<br> | <br> | ||
=== Managing Authentication Keys === | === Managing Authentication Keys === | ||
'''Authentication keys''' are usually obtained from the maintainer of the software repository. The maintainer will often place a copy of the authentication key on a public key server such as www.keyserver.net. The key can then be retrieved using the command | '''Authentication keys''' are usually obtained from the maintainer of the software repository. The maintainer will often place a copy of the authentication key on a public key server such as www.keyserver.net. The key can then be retrieved using the command | ||
<pre><nowiki> | <pre><nowiki> | ||
gpg --keyserver [name of keyserver] --recv-keys [keyhash] </nowiki></pre> | gpg --keyserver [name of keyserver] --recv-keys [keyhash] </nowiki></pre> | ||
* In our example above, you would import the maintainer's authentication key as follows: | * In our example above, you would import the maintainer's authentication key as follows: | ||
<pre><nowiki> | <pre><nowiki> | ||
gpg --keyserver subkeys.pgp.net --recv-keys 1135D466 </nowiki></pre> | gpg --keyserver subkeys.pgp.net --recv-keys 1135D466 </nowiki></pre> | ||
* Then, add the key to Ubuntu's apt trusted keys database with the following command | * Then, add the key to Ubuntu's apt trusted keys database with the following command | ||
<pre><nowiki> | <pre><nowiki> | ||
gpg --export --armor 1135D466 | sudo apt-key add - </nowiki></pre> | gpg --export --armor 1135D466 | sudo apt-key add - </nowiki></pre> | ||
* Note there's a dash at the end of the line | * Note there's a dash at the end of the line | ||
<br> | <br> | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png For more on apt and authentication keys, see [http://wiki.debian.org/SecureApt SecureApt] on the Debian Wiki. | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=info.png For more on apt and authentication keys, see [http://wiki.debian.org/SecureApt SecureApt] on the Debian Wiki. | ||
<br> | <br> | ||
=== See also === | === See also === | ||
* [[UbuntuHelp:../CommandLine| Managing Software Repositories from the Command Line]] | * [[UbuntuHelp:../CommandLine| Managing Software Repositories from the Command Line]] | ||
* [[UbuntuHelp:../Kubuntu| Managing Software Repositories in Kubuntu]] | * [[UbuntuHelp:../Kubuntu| Managing Software Repositories in Kubuntu]] | ||
* Chapter 2 of the Ubuntu Desktop Guide, [http://help.ubuntu.com/ubuntu/desktopguide/C/add-applications.html Adding, Removing and Updating Applications] | * Chapter 2 of the Ubuntu Desktop Guide, [http://help.ubuntu.com/ubuntu/desktopguide/C/add-applications.html Adding, Removing and Updating Applications] | ||
* An [http://www.ubuntulinux.nl/source-o-matic automatic sources.list generator] | * An [http://www.ubuntulinux.nl/source-o-matic automatic sources.list generator] | ||
* The [http://www.debian.org/doc/user-manuals#apt-howto Debian Apt User Manual] | * The [http://www.debian.org/doc/user-manuals#apt-howto Debian Apt User Manual] | ||
* '''man pages''' | * '''man pages''' | ||
** sources.list | ** sources.list | ||
<br> | <br> | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 21:15的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Repositories/Ubuntu }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/af | • {{#if: UbuntuHelp:Repositories/Ubuntu|Afrikaans| [[::Repositories/Ubuntu/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ar | • {{#if: UbuntuHelp:Repositories/Ubuntu|العربية| [[::Repositories/Ubuntu/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/az | • {{#if: UbuntuHelp:Repositories/Ubuntu|azərbaycanca| [[::Repositories/Ubuntu/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/bcc | • {{#if: UbuntuHelp:Repositories/Ubuntu|جهلسری بلوچی| [[::Repositories/Ubuntu/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/bg | • {{#if: UbuntuHelp:Repositories/Ubuntu|български| [[::Repositories/Ubuntu/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/br | • {{#if: UbuntuHelp:Repositories/Ubuntu|brezhoneg| [[::Repositories/Ubuntu/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ca | • {{#if: UbuntuHelp:Repositories/Ubuntu|català| [[::Repositories/Ubuntu/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/cs | • {{#if: UbuntuHelp:Repositories/Ubuntu|čeština| [[::Repositories/Ubuntu/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/de | • {{#if: UbuntuHelp:Repositories/Ubuntu|Deutsch| [[::Repositories/Ubuntu/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/el | • {{#if: UbuntuHelp:Repositories/Ubuntu|Ελληνικά| [[::Repositories/Ubuntu/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/es | • {{#if: UbuntuHelp:Repositories/Ubuntu|español| [[::Repositories/Ubuntu/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/fa | • {{#if: UbuntuHelp:Repositories/Ubuntu|فارسی| [[::Repositories/Ubuntu/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/fi | • {{#if: UbuntuHelp:Repositories/Ubuntu|suomi| [[::Repositories/Ubuntu/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/fr | • {{#if: UbuntuHelp:Repositories/Ubuntu|français| [[::Repositories/Ubuntu/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/gu | • {{#if: UbuntuHelp:Repositories/Ubuntu|ગુજરાતી| [[::Repositories/Ubuntu/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/he | • {{#if: UbuntuHelp:Repositories/Ubuntu|עברית| [[::Repositories/Ubuntu/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/hu | • {{#if: UbuntuHelp:Repositories/Ubuntu|magyar| [[::Repositories/Ubuntu/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/id | • {{#if: UbuntuHelp:Repositories/Ubuntu|Bahasa Indonesia| [[::Repositories/Ubuntu/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/it | • {{#if: UbuntuHelp:Repositories/Ubuntu|italiano| [[::Repositories/Ubuntu/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ja | • {{#if: UbuntuHelp:Repositories/Ubuntu|日本語| [[::Repositories/Ubuntu/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ko | • {{#if: UbuntuHelp:Repositories/Ubuntu|한국어| [[::Repositories/Ubuntu/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ksh | • {{#if: UbuntuHelp:Repositories/Ubuntu|Ripoarisch| [[::Repositories/Ubuntu/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/mr | • {{#if: UbuntuHelp:Repositories/Ubuntu|मराठी| [[::Repositories/Ubuntu/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ms | • {{#if: UbuntuHelp:Repositories/Ubuntu|Bahasa Melayu| [[::Repositories/Ubuntu/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/nl | • {{#if: UbuntuHelp:Repositories/Ubuntu|Nederlands| [[::Repositories/Ubuntu/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/no | • {{#if: UbuntuHelp:Repositories/Ubuntu|norsk| [[::Repositories/Ubuntu/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/oc | • {{#if: UbuntuHelp:Repositories/Ubuntu|occitan| [[::Repositories/Ubuntu/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/pl | • {{#if: UbuntuHelp:Repositories/Ubuntu|polski| [[::Repositories/Ubuntu/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/pt | • {{#if: UbuntuHelp:Repositories/Ubuntu|português| [[::Repositories/Ubuntu/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ro | • {{#if: UbuntuHelp:Repositories/Ubuntu|română| [[::Repositories/Ubuntu/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/ru | • {{#if: UbuntuHelp:Repositories/Ubuntu|русский| [[::Repositories/Ubuntu/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/si | • {{#if: UbuntuHelp:Repositories/Ubuntu|සිංහල| [[::Repositories/Ubuntu/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/sq | • {{#if: UbuntuHelp:Repositories/Ubuntu|shqip| [[::Repositories/Ubuntu/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/sr | • {{#if: UbuntuHelp:Repositories/Ubuntu|српски / srpski| [[::Repositories/Ubuntu/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/sv | • {{#if: UbuntuHelp:Repositories/Ubuntu|svenska| [[::Repositories/Ubuntu/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/th | • {{#if: UbuntuHelp:Repositories/Ubuntu|ไทย| [[::Repositories/Ubuntu/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/tr | • {{#if: UbuntuHelp:Repositories/Ubuntu|Türkçe| [[::Repositories/Ubuntu/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/vi | • {{#if: UbuntuHelp:Repositories/Ubuntu|Tiếng Việt| [[::Repositories/Ubuntu/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/yue | • {{#if: UbuntuHelp:Repositories/Ubuntu|粵語| [[::Repositories/Ubuntu/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/zh | • {{#if: UbuntuHelp:Repositories/Ubuntu|中文| [[::Repositories/Ubuntu/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/zh-hans | • {{#if: UbuntuHelp:Repositories/Ubuntu|中文(简体)| [[::Repositories/Ubuntu/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Repositories/Ubuntu | UbuntuHelp:Repositories/Ubuntu | {{#if: | :}}Repositories/Ubuntu}}/zh-hant | • {{#if: UbuntuHelp:Repositories/Ubuntu|中文(繁體)| [[::Repositories/Ubuntu/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:Repositories/Ubuntu|:Repositories/Ubuntu|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Repositories/Ubuntu/zh | | {{#ifexist: Repositories/Ubuntu/zh | | {{#ifeq: {{#titleparts:Repositories/Ubuntu|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Repositories/Ubuntu|1|-1|}} | zh | | }}
What are Repositories?
There are thousands of programs available to install on Ubuntu. These programs are stored in software archives (repositories) and are available for installation over the Internet. This makes it very easy to install new programs. It is also very secure, because each program you install is thoroughly tested and built specifically for Ubuntu.
The Ubuntu software repository is organised into four "components", on the basis of the level of support Ubuntu can offer them, and whether or not they comply with Ubuntu's Free Software Philosophy. The components are called Main (officially supported software), Restricted (supported software that is not available under a completely free license), Universe (community-maintained, i.e. not officially supported software) and Multiverse (software that is "not free"). You can find more information about the Ubuntu Repositories here.
The Ubuntu Install CDs contain software from the Main and Restricted components. Once your system is made aware of the Internet-based locations for these repositories, many more software programs are made available for installation. Using the software package management tools already installed on your system, you can search for, install and update any piece of software directly over the Internet, without the need for the CD.
Adding Repositories in Ubuntu
This page describes how to manage software repositories in Ubuntu 6.10 (Edgy Eft) and Ubuntu 6.06 (Dapper Drake). For Kubuntu please see Kubuntu repository management. For earlier versions of Ubuntu please see this wiki page. The operations described on this page modify the software repositories configuration file located at
/etc/apt/sources.list
Software sources can also be managed by making direct modifications to this file using the command line. If you prefer to use the command line instead of a graphical user interface, see Managing Repositories from the Command Line instead.
Adding the Universe and Multiverse Repositories
- Navigate to "System" > "Administration" > "Software Properties". You will have to enter your password here.
- A list of repositories or "Channels" will be shown. Select "Ubuntu 6.06 LTS (source)" from the list (should be the first one), click "Add...", select "non-free (multiverse)" and "community maintained (universe)" by clicking their check boxes. Now click the "add" button.
- Click Close to save your changes. A dialog box should appear, asking whether you'd like to update the list of repositories. Click Reload to apply your changes.
Integration with Synaptic Package Manager
- The next time you use the Synaptic package manager, click on the Reload button to make it aware of the new software repositories.
- You can also manage software repositories from within Synaptic by selecting "Settings" > "Repositories".
Adding Canonical Commercial Repositories
To launch the Synaptic Package Manager hit System -> Administration -> Synaptic Package Manager .
Next you will be prompted for your password to be able to launch Synaptic as super user.
Once that's all done you should now have the Synaptic package manager on your screen. On the menu of this screen you will want to click on Settings -> Repositories
This is were you will be able to add the Canonical commercial repositories. on the left of the screen click on the button Add.
The Add Channel screen will come up. On this screen select the Custom option.
On this screen type the following line and then click on Add Channel.
deb http://archive.canonical.com/ubuntu
feisty-commercial main
Now hit Close. From the main Synaptic window, hit Reload. Once this finishes, you will now be able to get packages from the Canonical commercial repositories using the Synaptic Package Manager.
Anchor(other)
Adding Other Repositories
Note: There are some (but not many) good reasons for which you might want to add non-Ubuntu repositories to your list of software sources. For example, some software cannot be distributed by Ubuntu due to patent and licensing restrictions in some countries (see the RestrictedFormats page for examples). You might want to add repositories that offer such software. Make sure that all repositories you add in this way have been tested and are known to work on Ubuntu systems. Repositories that are not designed to work with your version of Ubuntu can introduce inconsistencies in your system and might force you to re-install.
Anchor(add)
You can add custom software repositories by adding the apt repository line of your software source to the list of repositories. To do so, click on the Add button next to the Channel list in the Software Preferences panel, then select Custom.
Anchor(aptline)
- Enter the apt line into the dialog box. It should look something like this:
deb http://mirror3.ubuntulinux.nl/ dapper-seveas freenx
For an explanation of the different parts of the apt line, see the edit Editing Repositories section below.
Managing Local Repositories
Disable the CD-ROM Repository
If you have installed Ubuntu from one of Ubuntu's CD-ROMs, the CD will be included in the list of repositories used by the package managment tools. When you install a new package, Synaptic will check whether the package is available locally (i.e. on the CD-ROM). Synaptic may then ask for the CD-ROM. This can help reduce the size of downloads and speed up the installation process. If you would like Synaptic to rely solely on the internet repositories for package management, you can disable the CD-ROM entry with a few steps:
- Launch Synaptic and navigate to "Settings" > "Repositories".
A list of software repositories or "Channels" will be shown. - Locate the entry for the CD-ROM (it may say something like CD disk with Ubuntu 6.06 LTS). Click on the checkbox next to it to disable the CD-ROM as a software source.
- Click the Close button to save the changes you have made.
- You can re-enable the CD-ROM at any time using the checkbox next to its entry.
Removing Repositories
To remove software sources ("Channels") from the list, select the source and click on the Remove button. (If you only want to disable the repository temporarily, uncheck the checkbox next to the source instead.)
Use with caution: At present, you will not be asked to confirm the remove action. This is not a problem with the Ubuntu repositories as you can simply add add them again, but you may have to look up a custom repository line if you mistakenly delete it. (It is always a good idea to back up your sources.list)
Anchor(edit)
Editing Repositories
To make changes to a software source, select it in the list and click the Edit button. A dialog box displays the apt line, broken up into its components.
- Type Software sources may contain software in binary or source code format. Select the option that corresponds to the repository.
The corresponding apt line has deb for binary repositories and deb-src for source code repositories.
- URI Enter a valid Uniform Resource Indicator or URI for the software repository. Here's a list of examples:
- cdrom
- cdrom
cdrom:[description_of_cd]/
- ftp
ftp://ftp.domain.ext/path/to/repository
- http
http://www.domain.ext/path/to/repository
- smb (works only when the computer is connected to a Samba share)
smb://path/to/repository
- nfs (works only if the computer is connected to a NFS share)
file://path/to/local/directory
- Distribution
Select the name of the distribution or the name of the distribution version.
(dapper-seveas aptline in the example above.)
- Components
Select the repository section to access. Add more sections separated by spaces.
(The aptline example repository has a freenx section.)
- Comment
Add a comment to describe the repository for easier reference.
Repositories defined using the Software Preferences panel are available to Update-Manager and will be periodically checked for updates.
Managing Authentication Keys
Authentication keys are usually obtained from the maintainer of the software repository. The maintainer will often place a copy of the authentication key on a public key server such as www.keyserver.net. The key can then be retrieved using the command
gpg --keyserver [name of keyserver] --recv-keys [keyhash]
- In our example above, you would import the maintainer's authentication key as follows:
gpg --keyserver subkeys.pgp.net --recv-keys 1135D466
- Then, add the key to Ubuntu's apt trusted keys database with the following command
gpg --export --armor 1135D466 | sudo apt-key add -
- Note there's a dash at the end of the line
For more on apt and authentication keys, see SecureApt on the Debian Wiki.
See also
- Managing Software Repositories from the Command Line
- Managing Software Repositories in Kubuntu
- Chapter 2 of the Ubuntu Desktop Guide, Adding, Removing and Updating Applications
- An automatic sources.list generator
- The Debian Apt User Manual
- man pages
- sources.list