How to install software under ubuntu

1. Software installation under ubuntu

There are several ways to install software under the ubuntu system .

Commonly used methods are as follows:

1. Use the apt tool to install.

2. deb package installation.

3. Download the source code of the program and compile and install it yourself.

4. Install through the software center that comes with the ubuntu system (this method is not commonly used, because it has not been easy to use).

2. Several software installation methods

The following mainly introduces the first three methods, because the first three methods are more commonly used in development.

1. Use the apt tool to install

Use the apt software installation tool to install the software. In the ubuntu system, there may often be a dependency relationship between software, and a software often depends on many kinds of software.

The apt installation tool resolves this dependency, that is, the apt tool is used to install software, and the system can automatically find and install the software that the software depends on. The apt tool can realize automatic download, configuration and installation.

Note: The apt-get install installation method requires root privileges.

The specific method is as follows:

(1) Open the ubuntu terminal;

(2) Terminal input command, for example: sudo apt-get install vim

The above operations can automatically complete the installation.

2. deb package installation

Use the dpkg command to install deb packages. The premise of using this method to install software is that it can be found and downloaded to the deb package on the Internet.

The deb package is a file with a .deb suffix.

The installation method is as follows:

(1) Download the xx.deb software package from the Internet.

(2) Enter the directory where the xx.deb software package is located, open the terminal, and enter the following command in the terminal: sudo dpkg -i xx.deb

The above command can complete the software installation. After the installation is complete, you can open the software and use it to confirm whether the installation is successful.

3. Download the source code, compile and install it yourself

Some programs sometimes provide source code, we can download the source code package from the Internet, compile and install it under the ubuntu system.

This installation method is often used in embedded development. For example, some commands are required in embedded devices. You can cross-compile related software source code packages under the ubuntu system and put executable programs in embedded devices for use.

Let's take the tree command installation as an example to illustrate the installation steps of this method:

The installation method is as follows:

(1) Download the tree source code package from the Internet, which can be downloaded from the following website:

http://mama.indstate.edu/users/ice/tree/

Unzip the source code package under the ubuntu system. As follows:

(2) Enter the source package directory, and you can check the content of the README file to determine the installation method of the package. The README file points out that the software can be installed by viewing the contents of the INSTALL file.

The contents of the INSTALL file are as follows:

Installation instructions:

1. Edit the Makefile for your OS.  Comment out the Linux options and un-comment
   the options for your OS.
2. Type: make
3. Type: make install

(3) According to the above description, it can be known. Enter the sudo make command in the terminal to compile the source code.

Note: This requires root administrator privileges to compile.

(4) Finally, enter the sudo make install command to follow.

Note: The installation operation here also requires root administrator authority, because the tree installation path is in a certain directory of the root directory of the entire system.

As follows:

As can be seen from the above, tree is installed in the /usr/local/bin directory.

Other installation methods:

When installing software in the ubuntu system, there is also a software package  xx.run , that is, a software package with a .run suffix. This is also a package that supports installation under the ubuntu system. The specific method can be Baidu.

Guess you like

Origin blog.csdn.net/wojiaxiaohuang2014/article/details/129140086