Linux detailed software package management and source

Source: Internet
Author: User

Package management and source is an indispensable part of Linux learning, but also makes many beginners feel puzzled. This article has collated some Linux related package management and the source aspect material, hoped to be helpful to everybody.


Linux software packages are mainly divided into the RPM package and the Deb package two categories, including Redhat Linux and other systems using the RPM package, Ubuntu Linux and other systems using the Deb package. This paper focuses on the package management method of Ubuntu Linux.


First, we introduce several concepts and understandings:

(1) installation is to send the software to a specific location, and the configuration of its surrounding environment, so that it can operate correctly.

(2) The Deb package is a compressed package that can be installed.

(3) Source is the site to provide software downloads, different sources may provide different software.

(4) Ubuntu establishes a local database and records dependencies between packages.

(5) The role of the package management tool is to provide a way to install, upgrade, uninstall the required software in the operating system, and to provide queries on all software status information in the system.


If you can understand the above points, you can have a basic understanding of package management. The Deb package is used in Ubuntu and the site that provides the download of the Deb package is saved in the/etc/apt/sources.list configuration file, which is the source. Since there may be dependencies between the packages, manual installation and uninstallation can be cumbersome and error-prone once the packages are installed to a certain number. In order to solve this problem, there are many advanced package management tools, such as Apt-get, aptitude, yum, synaptic and so on. In Apt-get, for example, the tool establishes a local database and records dependencies between packages. When a package is installed, it is searched and downloaded locally from the source, while checking all other packages that the package relies on, and installing dependent packages that are not already installed on the system, and removing them in a similar way, simplifying the package management process. It is important to note that these advanced package management tools are eventually called dpkg to complete.


In addition, there are several commands commonly used in package management that can be used to understand and learn with the man command or command--help.

(1) dpkg

is a shorthand for the Debian package and is the foundation of the Debian packages manager.

(2) Apt-get

Used to retrieve packages from a remote and handle complex package relationships.

Apt-get Update: After you modify the source, you need to run the command, and you need to run the command periodically to make sure that the list of packages on this computer is up to date.

Apt-get Upgrade: To update the package

Apt-get Dist-upgrade: Upgrade the system to a new version.

Apt-get Source: Download the code.

(3) Apt-cache

Apt-cache search string: Searching for strings in the package list

Apt-cache showpkg: Displaying package information

(4) Alien

The conversion between the RPM package and the Deb package can be completed.

Alien-to-deb: Convert to Deb Package

ALIEN-TO-RPM: Converting to RPM package


Finally, there are some solutions that some beginners often encounter problems.

(1) How do I install the tar file?

In general, this is stored in the source code of the software, you need to first unzip and compile with the tar command, and finally installed.

Unzip according to the file packaging format using the appropriate command, and then into the extracted directory,

Generally executed in turn./configure

Make

sudo make install

To complete the installation.

(2) How to install the downloaded Deb software package?

sudo dpkg-i package.deb or

sudo alien-i package.deb

(3) How do I install the RPM software package in Ubuntu?

First, you use Alien to convert the RPM package to a Deb package.

sudo alien--to-deb package.rpm

The installation is followed by the installation of the Deb package.

(4) How to query the software package installed by this machine?

Using Dpkg-l | More commands

Linux detailed software package management and source

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.