How to Create ubuntu local source

Source: Internet
Author: User
For details about how to create the ubuntu local source-general Linux technology-Linux technology and application information, see the following. The simplest method to create local data sources:
There are two types of packages in the packs Folder: one is a. Deb package (full dependency package and software package, and the other is packages.gz.

The second type of package includes the list of required software packages and dependency information.

This package is generated later. It is generated using the following command:

Sudo dpkg-scanpackages packs/dev/null | gzip> packs/Packages.gz ### packs contains the folder of all software packages. This command is executed in a directory on the pakcs folder. Packages.gz is generated in the packs folder.

1. Copy all packages in packs to the/var/cache/apt/archives/directory.
Command:
Sudo cp ~ /Packs/*. deb/var/cache/apt/archives/
Sudo chmod 777-R/var/cache/apt/archives/

2. Create such a directory under the/media directory:
Create gutsy and create packs under gutsy ### note that all files are folders
Copy packages.gz to packs and grant the permission.
Command:
Sudo mkdir/media/gutsy
Sudo mkdir/media/gutsy/packs
Sudo cp ~ /Packages.gz/media/packs/
Sudo chmod 777-R/media/gutsy/
Sudo chmod 777-R/var/cache/apt/archives/
After completing the preceding operations, run the following command:

3. sudo gedit/etc/apt/sources. list
Enter the sources. list file, clear the content in the file, and fill in the following line:
Deb file: // media/gutsy packs/
After the three steps are completed, the local source is created.

Run
Sudo apt-get update
After sudo apt-get dist-upgrade, everything is normal.

Sudo apt-get install XXX ### install any software package you need, provided that it is in the local source.

NOTE: If your local source is still being improved and some packages need to be updated and added continuously, in order not to delay your use, when you can connect to the Internet, you can use the following two apt sources as a supplement:
CODE: deb http://debian.ustc.edu.cn/ubuntu/ gutsy main restricted universe multiverse
Deb http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse
Deb http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
Deb http://debian.ustc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
Deb http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse
Deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy main restricted universe multiverse
Deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse
Deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
Deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
Deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse
Http://mirror.bjtu.edu.cn/ubuntu/ gutsy main restricted universe multiverse
Deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse
Deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
Deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse
Deb http://mirror.bjtu.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
Deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy main restricted universe multiverse
Deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse
Deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
Deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse
Deb-src http://mirror.bjtu.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.