Usually, windows can be connected to the Internet but ubuntu cannot be connected to the Internet on the same machine. However, this is common in Campus Networks with Chinese characteristics. although there are local solutions, the advantages of apt cannot be reflected in the need for a networked linux and a huge hard disk space (and fast network speed.
The following describes a relatively roundabout method:
First, download the package information from the source. For the download list, see the attachment. here we use the cn99 source and gutsy as an example (I haven't read the source manual yet, so I just downloaded the gutsy-related items outside the pool folder. For other cases, please compare them yourself ).
Note that you need to use the download software that can reconstruct the directory structure to download, just like the-x option of wget.Code:Wget-B-I cn99_gutsy.lst-w 2-x
Be honest, please use a single thread + latency for downloading, and use your own ip Address
After the download, it looks like thisCode:Autumncat @ autumncat-host :~ /Apt-source/ubuntu.cn99.com
$ Find
.
./Ubuntu
./Ubuntu/dists
./Ubuntu/dists/gutsy
./Ubuntu/dists/gutsy/Contents-amd64.gz
./Ubuntu/dists/gutsy/Contents-i386.gz
./Ubuntu/dists/gutsy/Release
./Ubuntu/dists/gutsy/Release. gpg
./Ubuntu/dists/gutsy/main
./Ubuntu/dists/gutsy/main/binary-amd64
./Ubuntu/dists/gutsy/main/binary-amd64/packages.bz2
./Ubuntu/dists/gutsy/main/binary-amd64/packages.gz
./Ubuntu/dists/gutsy/main/binary-amd64/release
./Ubuntu/dists/gutsy/main/binary-i386
./Ubuntu/dists/gutsy/main/binary-i386/packages.bz2
./Ubuntu/dists/gutsy/main/binary-i386/packages.gz
./Ubuntu/dists/gutsy/main/binary-i386/release
./Ubuntu/dists/gutsy/main/Debian-Installer
./Ubuntu/dists/gutsy/main/Debian-installer/binary-amd64
./Ubuntu/dists/gutsy/main/Debian-installer/binary-amd64/packages.bz2
....
Then you can copy the entire directory to a directory in Linux.
Then modify the source list, as shown in the following figure:Code:$ CAT/etc/APT/sources. List
Deb file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
Deb file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
Deb file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
Deb file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
Deb file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
Deb-src file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
Deb-src file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
Deb-src file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
Deb-Src file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
Deb-Src file: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
LastCode:Sudo apt-Get update
But at this time, Apt-Get install is useless, because the huge pool directory is not downloaded.
The next step is to obtain the package address. There are many methods, such as using apt-Get.Code:$ Apt-Get install -- print-Uris-y gedit | cut-D/'-S-F 2-2
File: // home/autumncat/apt-source/sources
File: // home/autumncat/apt-source/sources
File: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/pool/main/g/gedit/gedit-common_2.w.3-0ubuntu=all.deb
File: // home/autumncat/apt-source/sources
File: // home/autumncat/apt-source/ubuntu.cn99.com/ubuntu/pool/main/g/gedit/gedit_2.20.3-0ubuntu=i386.deb
Or new
But we can see that the URL is incorrect. Let's fix it (replace the previous part with the correct one ):Code:$ Apt-get install -- print-uris-y gedit | cut-d/'-s-f 2-2 | sed's | file: /// home/autumncat/apt-source/| http: // | G'
Http://ubuntu.cn99.com/ubuntu/pool/main/g/gtksourceview2/libgtksourceview2.0-common_2.0.1-0ubuntu1_all.deb
Http://ubuntu.cn99.com/ubuntu/pool/main/g/gtksourceview2/libgtksourceview2.0-0_2.0.1-0ubuntu1_i386.deb
Http://ubuntu.cn99.com/ubuntu/pool/main/g/gedit/gedit-common_2.20.3-0ubuntu1_all.deb
Http://ubuntu.cn99.com/ubuntu/pool/main/p/pygtksourceview/python-pygtksourceview_2.0.0-0ubuntu3_i386.deb
Http://ubuntu.cn99.com/ubuntu/pool/main/g/gedit/gedit_2.20.3-0ubuntu1_i386.deb
Finally, you can download the required deb package in windows.
After the required deb package download, You Can dpkg-I or put it in the cache directory to install. From: http://forum.ubuntu.org.cn/viewtopic.php? T = 87977