Software Package management and source in Linux; software package in linux

Source: Internet
Author: User

Software Package management and source in Linux; software package in linux

Package management and source are an indispensable part of Linux learning, and it also puzzles many beginners. This article has compiled some Linux-related package management and source materials, hoping to help you.


Linux software packages are mainly divided into RPM software packages and DEB software packages. Redhat Linux and other systems use RPM software packages, while Ubuntu Linux and other systems use Deb software packages. This article focuses on the management of Ubuntu Linux packages.


First, introduce several concepts and understandings:

(1) Installation means to deliver the software to a specific location and configure its surrounding environment so that it can run correctly.

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

(3) the source is a site that provides software download. Different sources may provide different software.

(4) Establish a local database in Ubuntu and record dependencies between software packages.

(5) The function of the software package management tool is to provide methods for installing, upgrading, and detaching required software in the operating system, and to query the status information of all software in the system.


If you can understand the above points, you can have a basic understanding of package management. The Deb software package is used in Ubuntu. In the/etc/apt/sources. list configuration file, the site that provides the deb Software Package download is saved, that is, the source. Because the software package may have dependencies, once the number of installed software packages reaches a certain level, manual installation and uninstallation will be very cumbersome and error-prone. To solve this problem, many advanced software package management tools, such as apt-get, aptitude, yum, and synaptic, have emerged. Taking apt-get as an example, this tool establishes a local database and records dependencies between software packages. When you want to install a software package, it searches for and downloads the package from the source to the local device, checks all other packages that the software package depends on, and installs the dependency packages that are not yet installed in the system; deleting a package simplifies the package management process. It is worth noting that these advanced package management tools ultimately call dpkg.


In addition, you need to introduce several frequently used commands in package management. For details, you can use man command or command -- help to understand and learn.

(1) dpkg

Is short for "debian package" and is the basis of the Debian Software package Manager.

(2) apt-get

It is used to remotely obtain software packages and process complex software package relationships.

Apt-get update: After modifying the source, you need to run this command. In addition, you need to regularly run this command to ensure that the local package list is up-to-date.

Apt-get upgrade: Used to update software packages

Apt-get dist-upgrade: upgrade the system to the new version.

Apt-get source: Download the source code.

(3) apt-cache

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

Apt-cache showpkg: displays the package information.

(4) alien

Converts the rpm package to the deb package.

Alien-to-deb: Convert to deb Software Package

Alien-to-rpm: rpm package


Finally, we will introduce several solutions that beginners often encounter.

(1) how to install the tar file?

In general, the source code of the software is saved here. You need to decompress and compile the software with the tar command, and finally install the software.

Decompress the package and use the corresponding commands to enter the decompressed directory,

Execute./configure in sequence.

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 to install the rpm package in Ubuntu?

First, use alien to convert the rpm package to the deb package.

Sudo alien -- to-deb package. rpm

Then install the deb software package.

(4) How to query the software packages installed on the local machine?

Run the dpkg-l | more command.

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.