特殊:Badtitle/NS100:AptCdrom:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第19行: | 第19行: | ||
==== Description and options ==== | ==== Description and options ==== | ||
* '''add''' is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then procceed to scan it and copy the index files. If the disc does not have a proper .disk/ directory you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list | * '''add''' is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then procceed to scan it and copy the index files. If the disc does not have a proper .disk/ directory you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list | ||
* '''ident''' is a [[debugging]] tool to report the identity of the current disc as well as the stored file name. | * '''ident''' is a [[UbuntuHelp:debugging|debugging]] tool to report the identity of the current disc as well as the stored file name. | ||
*'''-d''' or '''--cdrom''' : MountPoint (specify the location to mount the cdrom). This mount point must be listed in /etc/fstab and properly configured. | *'''-d''' or '''--cdrom''' : MountPoint (specify the location to mount the cdrom). This mount point must be listed in /etc/fstab and properly configured. | ||
* '''-r''' or '''--rename''' : rename a disc; change the label of a disk or override the disks given label. This option will cause apt-cdrom to prompt for a new label. | * '''-r''' or '''--rename''' : rename a disc; change the label of a disk or override the disks given label. This option will cause apt-cdrom to prompt for a new label. | ||
第31行: | 第31行: | ||
=== See also === | === See also === | ||
* http://linux.die.net/man/8/apt-cdrom | * http://linux.die.net/man/8/apt-cdrom | ||
* [[AptGet/Offline]] | * [[UbuntuHelp:AptGet/Offline|AptGet/Offline]] | ||
* UpdateManager | * [[UbuntuHelp:UpdateManager|UpdateManager]] | ||
* PackageCDs | * [[UbuntuHelp:PackageCDs|PackageCDs]] | ||
---- | ---- | ||
[[category:CategoryOffline]] [[category:CategoryPackageManagement]] [[category:CategoryHardware]] | [[category:CategoryOffline]] [[category:CategoryPackageManagement]] [[category:CategoryHardware]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 21:33的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/AptCdrom }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/af | • {{#if: UbuntuHelp:AptCdrom|Afrikaans| [[::AptCdrom/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ar | • {{#if: UbuntuHelp:AptCdrom|العربية| [[::AptCdrom/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/az | • {{#if: UbuntuHelp:AptCdrom|azərbaycanca| [[::AptCdrom/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/bcc | • {{#if: UbuntuHelp:AptCdrom|جهلسری بلوچی| [[::AptCdrom/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/bg | • {{#if: UbuntuHelp:AptCdrom|български| [[::AptCdrom/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/br | • {{#if: UbuntuHelp:AptCdrom|brezhoneg| [[::AptCdrom/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ca | • {{#if: UbuntuHelp:AptCdrom|català| [[::AptCdrom/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/cs | • {{#if: UbuntuHelp:AptCdrom|čeština| [[::AptCdrom/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/de | • {{#if: UbuntuHelp:AptCdrom|Deutsch| [[::AptCdrom/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/el | • {{#if: UbuntuHelp:AptCdrom|Ελληνικά| [[::AptCdrom/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/es | • {{#if: UbuntuHelp:AptCdrom|español| [[::AptCdrom/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/fa | • {{#if: UbuntuHelp:AptCdrom|فارسی| [[::AptCdrom/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/fi | • {{#if: UbuntuHelp:AptCdrom|suomi| [[::AptCdrom/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/fr | • {{#if: UbuntuHelp:AptCdrom|français| [[::AptCdrom/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/gu | • {{#if: UbuntuHelp:AptCdrom|ગુજરાતી| [[::AptCdrom/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/he | • {{#if: UbuntuHelp:AptCdrom|עברית| [[::AptCdrom/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/hu | • {{#if: UbuntuHelp:AptCdrom|magyar| [[::AptCdrom/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/id | • {{#if: UbuntuHelp:AptCdrom|Bahasa Indonesia| [[::AptCdrom/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/it | • {{#if: UbuntuHelp:AptCdrom|italiano| [[::AptCdrom/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ja | • {{#if: UbuntuHelp:AptCdrom|日本語| [[::AptCdrom/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ko | • {{#if: UbuntuHelp:AptCdrom|한국어| [[::AptCdrom/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ksh | • {{#if: UbuntuHelp:AptCdrom|Ripoarisch| [[::AptCdrom/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/mr | • {{#if: UbuntuHelp:AptCdrom|मराठी| [[::AptCdrom/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ms | • {{#if: UbuntuHelp:AptCdrom|Bahasa Melayu| [[::AptCdrom/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/nl | • {{#if: UbuntuHelp:AptCdrom|Nederlands| [[::AptCdrom/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/no | • {{#if: UbuntuHelp:AptCdrom|norsk| [[::AptCdrom/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/oc | • {{#if: UbuntuHelp:AptCdrom|occitan| [[::AptCdrom/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/pl | • {{#if: UbuntuHelp:AptCdrom|polski| [[::AptCdrom/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/pt | • {{#if: UbuntuHelp:AptCdrom|português| [[::AptCdrom/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ro | • {{#if: UbuntuHelp:AptCdrom|română| [[::AptCdrom/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/ru | • {{#if: UbuntuHelp:AptCdrom|русский| [[::AptCdrom/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/si | • {{#if: UbuntuHelp:AptCdrom|සිංහල| [[::AptCdrom/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/sq | • {{#if: UbuntuHelp:AptCdrom|shqip| [[::AptCdrom/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/sr | • {{#if: UbuntuHelp:AptCdrom|српски / srpski| [[::AptCdrom/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/sv | • {{#if: UbuntuHelp:AptCdrom|svenska| [[::AptCdrom/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/th | • {{#if: UbuntuHelp:AptCdrom|ไทย| [[::AptCdrom/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/tr | • {{#if: UbuntuHelp:AptCdrom|Türkçe| [[::AptCdrom/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/vi | • {{#if: UbuntuHelp:AptCdrom|Tiếng Việt| [[::AptCdrom/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/yue | • {{#if: UbuntuHelp:AptCdrom|粵語| [[::AptCdrom/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/zh | • {{#if: UbuntuHelp:AptCdrom|中文| [[::AptCdrom/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/zh-hans | • {{#if: UbuntuHelp:AptCdrom|中文(简体)| [[::AptCdrom/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptCdrom | UbuntuHelp:AptCdrom | {{#if: | :}}AptCdrom}}/zh-hant | • {{#if: UbuntuHelp:AptCdrom|中文(繁體)| [[::AptCdrom/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:AptCdrom|:AptCdrom|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :AptCdrom/zh | | {{#ifexist: AptCdrom/zh | | {{#ifeq: {{#titleparts:AptCdrom|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:AptCdrom|1|-1|}} | zh | | }}
You can use the Ubuntu Live Cd to install packages (i.e. to an older offline Ubuntu computer).
Source.list
If you have a new Live CD and the Live CD in the Source.list file, comment all the repositories excepting the CD and
sudo apt-get update sudo apt-get dist-upgrade
After upgrade, uncomment all the other repositories in the source.list file. Some computers can ask to use apt-cdrom. If so, follow the instructions that appears bellow.
Apt-cdrom
apt-cdrom can add a new CDROM to APTs sources.list file (list of available repositories). It is necessary to use apt-cdrom to add CDs to the APT system, it cannot be done by hand. Put the Live CD in the unit and use one of these commands, in this order :
- test:
sudo apt-cdrom --no-act add
- if everything is OK:
sudo apt-cdrom add
sudo apt-cdrom ident
sudo apt-cdrom -d "your-cdrom-mount-point" -r
Description and options
- add is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then procceed to scan it and copy the index files. If the disc does not have a proper .disk/ directory you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list
- ident is a debugging tool to report the identity of the current disc as well as the stored file name.
- -d or --cdrom : MountPoint (specify the location to mount the cdrom). This mount point must be listed in /etc/fstab and properly configured.
- -r or --rename : rename a disc; change the label of a disk or override the disks given label. This option will cause apt-cdrom to prompt for a new label.
- -n, --just-print, --recon or --no-act: no Changes; Do not change the sources.list file and do not write index files. Everything is still checked however.
Test
After dist-upgrade you can test that everything is OK
sudo apt-get -f install sudo dpkg --configure -a