UbuntuLinux system three methods to add a local software library

Source: Internet
Author: User
Article Title: UbuntuLinux system three methods to add a local software library. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

How can I prevent fsck from checking the vfat file system?

If you do not want the fsck to check the Windows (vfat) Partition at startup (sometimes this check produces many errors ), you can edit the/etc/fstab file to change the pass Parameter in column 6th to 0.

Add local software libraries in Ubuntu Linux

Source: CCID Author: kid

Ubuntu uses a local software package as the installation source. It has a high probability that new users can restart the system, every time we reinstall the system, we have to go through the long apt-get install to install the software we need, but it is really painful to install the software that is not available on the system installation CD.

Method 1:

The software packages downloaded by the system during each install, including the packages on which each software depends will be saved in

/Var/cache/apt/archives/directory, select

After installing all the software commonly used by you, copy all the files in the folder to a partition that is not often formatted, and use it as the local source for later system reinstallation, this saves time and effort.

The following is the operation process. For verification, the system is reinstalled once with no language.

1. Create a directory under your own root directory to store all downloaded software packages. The directory name is as you like. We recommend that you perform the following operations under your root directory, to avoid Operation permission problems.

Mkdir ~ /Packs

2. copy the file to the packs folder. The directory varies depending on the individual.

Sudo cp/var/cache/apt/archives /*~ /Packs

The packages.gz package will be created in step 3, which records the software package information under the packs folder, including the dependency information.

Dpkg-scanpackages packs/dev/null | gzip> packs/Packages.gz

After this operation, copy the packs folder to a partition that is not often formatted for long-term use. For example, if I put it on a fat32 partition, path:/media/hda6/linux/soft/packs

4. Add local source

Sudo gedit/etc/apt/sources. list

Add deb

[Url = file: // media/hda6/linux/soft/packs/] file: // media/hda6/linux/soft/packs/[/url]

Edgy main, note that this is only the path on my computer. Please modify it according to the actual location. edgy is my ubuntu version (7.04's version

Feisty), the main is not fixed, you can also use restricted and so on, just in the next step, the corresponding directory structure is different, here only

Main example. If you are interested, you can add a try. The system prompts that folder settings are displayed.

5. Set the directory structure under the packs directory

Create such a structure under the packs directory

Packs/dists/edgy/main/binary-i386/

Packs/# That is, create another packs under packs

The above two directories are used to place different types of packages. According to the prompts during the test on my computer, it seems that the binary-386 directory is under a variety of soft

Installation packs/

The directory contains dependent packages and system update packages, which basically start with lib. The safest way is to copy all the packages to these two folders.

6. configuration complete

After completing the above settings and copying files, you can start to use the local source normally and use the source on the network.

Sudo apt-get update

Sudo apt-get dist-upgrade

Sudo apt-get install XXX

Method 2:

After the first directory structure, put the packages.gz package under the binary-i386 folder, and then copy all the deb packages to/var/cache/apt/archives.

It is estimated that the apt-get install's work is like this. First, read the Software List and package dependency information from the packages.gz package. First, scan the local archieves directory when installing a software. If you can find the corresponding package, start the installation, otherwise, download the package from the source.

In fact, my idea of implementing these operations is very simple.

1. Backup of existing software packages

2. Create the Software List and dependency packages.gz

3. Create a directory structure. add keywords such as main and restricted to the local source address at will, and then apt-get update. An error message is displayed, it contains the directory structure corresponding to each keyword,

4. Add local source deb

[Url = file: //] file: // [/url]

Dir /...

We recommend that you carefully check the system prompts when encountering system errors. linux system error prompts are not as nonsense as Mr. Bill does.

Method 3:

Download the DVD version and use it as the source. There are two ways:

1. You can directly store the file on the hard disk and mount it to a directory, for example, sudo mount-t iso9660-o loop xxx. iso/mnt.

Change sources. list to deb.

[Url = file: // mnt] file: // mnt [/url]

Edgy main... is followed by your original format.

2. Set the CD Rom as the source in the new disk.

Next time we try sudo apt-get update again, there may be a new package file. Do you want to add it like this,

Also, can I add the packages downloaded from other sites and install them with sudo apt-get install xxx?

The principle is to read the software package and dependency information from packages.gz. if you add a new package to the package, re-execute it.

Dpkg-scanpackages packs/dev/null | gzip> packs/Packages.gz

To update the file information, and then

Sudo apt-get udpate

It should be OK,

If you downloaded the package, it must be the deb package and ensure that all the packages it depends on are stored locally.

It is best to save the/var/cache/apt/archives/files before you prepare to reinstall the system, and then create packages.gz

Put the downloaded content in one place, and then use sudo ln-s to/var/cache/apt/archives

Everything is OK!

Related Article

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.