Ubuntu 10.04 has more software than CD, which is undoubtedly used as the source for upgrade. It is very important for computers that cannot access the Internet. I searched the internet and found many methods. Generally, I checked something in the source manager. I don't like this GUI method, because if it fails, you don't know where the problem is. In Linux, you should use the command line method that Linux is good. I also said on the Internet, using the sudo apt-CDROM add command, which I also tried and failed.
In fact, we will not be confused if we look at what the real source looks like.
Open the 163 source Directory: http://mirrors.163.com, find Ubuntu/that one, there is help. There is a sources. list template in help.
Deb http://mirrors.163.com/Ubuntu/ karmic main restricted universe multiverse
Deb http://mirrors.163.com/Ubuntu/ karmic-security main restricted universe multiverse
Deb http://mirrors.163.com/Ubuntu/ karmic-Updates main restricted universe multiverse
Deb http://mirrors.163.com/Ubuntu/ karmic-proposed main restricted universe multiverse
Deb http://mirrors.163.com/Ubuntu/ karmic-backports main restricted universe multiverse
Deb-Src http://mirrors.163.com/Ubuntu/ karmic main restricted universe multiverse
The Deb-Src http://mirrors.163.com/Ubuntu/ karmic-security main restricted universe multiverse
Deb-Src http://mirrors.163.com/Ubuntu/ karmic-Updates main restricted universe multiverse
Deb-Src http://mirrors.163.com/Ubuntu/ karmic-proposed main restricted universe multiverse
Deb-Src Co., http://mirrors.163.com/Ubuntu/. Karmic-backports main restricted universe multiverse
This is the source of karmic (Ubuntu 9.10. What does it mean? First look at help
Man sources. List
You can find the format
Deb URI distribution [component1] [component2]...
Deb refers to the source. The corresponding Deb-Src is the source file. Uri indicates the URL, distribution indicates the release version, 9.10 is karmic, and 10.04 is lucid. The following is the component of the corresponding release.
However, the above explanation only refers to the logic. What is the actual situation? You just need to check the source directory.
Open mirrors.163.com/ubuntu with the following directories and files: dists/, indices/, pool/, Project/, ls-IR.gz.
Don't worry. Check the directory in the Ubuntu 10.04 DVD. You can mount the DVD either through a CD or ISO. The ISO mounting command is
Sudo mkdir/Media/Ubuntu
Sudo Mount-o loop-T iso9660/Media/Ubuntu/yourpath/to/ubuntu-dvd-i386.iso
As you can see, there are two identical directories under the root directory of the DVD: dists/and pools /.
Then, you will naturally think that dists represents the release version. Open the dists directory, whether it is mirrors.163.com/ubuntu/dists or/Media/Ubuntu/dists on the Internet, the lucid directory is shown below. Open lucid and find the main and restricted directories. The problem is clear. The so-called release version is only a sub-directory under the dists directory, and the component is a sub-directory of the next layer. Therefore
Deb http://mirrors.163.com/Ubuntu/ karmic main restricted universe multiverse
This is just a few directories.
Http://mirrors.163.com/Ubuntu/dists/karmic/main
Http://mirrors.163.com/Ubuntu/dists/karmic/restricted
Http://mirrors.163.com/Ubuntu/dists/karmic/universe
Http://mirrors.163.com/Ubuntu/dists/karmic/multiverse
Then the problem is solved. Add it to/etc/APT/sources. List.
Deb file: // media/Ubuntu lucid main restricted
Deb file: // media/Ubuntu stable main restricted
Deb file: // media/Ubuntu unstable main restricted
The reason for this write is based entirely on the directory structure. That is, the following directories
File: // media/Ubuntu/dists/lucid/main restricted
File: // media/Ubuntu/dists/lucid/restricted
File: // media/Ubuntu/dists/stable/main
File: // media/Ubuntu/dists/stable/restricted
File: // media/Ubuntu/dists/unstable/main
File: // media/Ubuntu/dists/unstable/restricted
Because you cannot access the Internet, it is also possible to clear other sources. These operations are directly targeted at/etc/APT/sources. List, instead of clicking a point with the mouse.
Then, update the source
Sudo apt-Get update
Next, you can install the software based on the new package manager or sudo apt-Get. Of course, only software in the DVD can be installed, and the package inside is obviously incomplete.
In addition, there is another problem: when a DVD disc is directly attached, the update fails. Check the source and find that it is written in this way.
Deb CDROM: [Ubuntu 10.04 lts _ lucid Lynx _-release i386 (20100429)]/lucid main restricted
It seems that it is automatically found in the optical drive, but it is not naturally found from the file. Find the actual directory to which the DVD is mounted and follow the previous method. However, the problem is that the directory is empty, and the URL in sources. List does not seem to have spaces. What should I do? Make a soft link.
Sudo ln-S/Media/Ubuntu \ 10.04 \ i386/Media/Ubuntu