Table of Contents
Several ways to install software on Linux
Home Operation and Maintenance Linux Operation and Maintenance What are the ways to install software in Linux?

What are the ways to install software in Linux?

May 11, 2022 pm 04:24 PM
linux

Installation method: 1. rpm method, download the software package to the specified directory, and execute the "rpm -ivh package name" command in the directory. 2. In deb mode, download the software package and execute the "dpkg -i package name" command. 3. In yum mode, confirm normal networking, execute the "yum install package name" command, etc.

What are the ways to install software in Linux?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Several ways to install software on Linux

1. Steps to install rpm package:

1. Find the corresponding software package, such as soft.version.rpm, and download it to a directory on the local machine;

2. Open a terminal and su - to become the root user;

3. Enter the directory where the package is located

cd 目录名
Copy after login
Copy after login

4. Execute the installation command

rpm -ivh 包名
Copy after login

Detailed introduction:

1. Installation:

I only need one simple sentence to finish. Execute: rpm –ivh rpm package name More advanced

2. Uninstall:

I also only need a simple sentence to finish. Execution: rpm –e software name

But it should be noted that the software name is used later, not the software package name.

For example, to install the package software-1.2.3-1.i386.rpm, you should execute: rpm –ivh software-1.2.3-1.i386.rpm When uninstalling, you should execute: rpm –e software.

In addition, Linux also provides graphical RPM tools such as GnoRPM and kpackage, making the whole process easier.

2. Installation using yum: (Install rpm package)

rpm is a software package name for Linux, ending with .rmp. The syntax when installing is: rpm -ivh package name. A big disadvantage of the rpm package installation is that the files are too interrelated. Sometimes, installing a software requires installing many other software packages, which is very troublesome.

Therefore, Red Hat Little Red Hat developed the yum installation method. It can completely solve this correlation problem. It is very convenient. You only need to configure two files to install. The installation method is: yum install software package name. yum is not a package, but a software for installing packages

Simply put: rpm can only install rpm packages that have been downloaded to the local machine; yum can download and install rpm packages online, and can update the system. It can also automatically handle dependency issues between packages, which the rpm tool does not have.

Steps:

1. When using yum to install software, you must first determine whether the server can be connected to the Internet normally. If it cannot be connected to the Internet normally, you cannot use yum. Installation

What are the ways to install software in Linux?

#2. When the Internet connection is confirmed, you can install it directly with yum. The syntax isyum install software package name; If the software package name is too long If so, you can directly press the tab key twice and the relevant software will automatically be listed, and then you can install it, as shown below

What are the ways to install software in Linux?

3. deb package installation method Steps:

1. Find the corresponding software package, such as soft.version.deb, and download it to a directory on your machine;

2. Open a terminal and su -Become the root user;

3. Enter the directory where the package is located

cd 目录名
Copy after login
Copy after login

4. Execute the installation command

dpkg -i 包名
Copy after login

Detailed introduction: This is a package manager provided by Debian Linux, which is very similar to RPM.

But because RPM appeared earlier, it is commonly seen in various versions of Linux.

The debian package manager dpkg only appears in Debina Linux, and is generally not available in other Linux versions.

1. Install

dpkg –i deb package name For example: dpkg –i software-1.2.3-1.deb

2. Uninstall

dpkg –e software name For example: dpkg –e software

3. Query: Query the software packages installed on the current system:

dpkg –l ‘*软件包名*’
Copy after login

For example: dpkg – l '*software*'

4. Installation method of tar.gz source code package:

1. Find the corresponding software Package, such as soft.tar.gz, download to a directory on the local machine;

2. Open a terminal, su - to become the root user;

3. cd where soft.tar.gz is located Directory;

4, tar -xzvf soft.tar.gz //Generally, a soft directory will be generated

5, cd soft

6, ./configure

7, make

8, make install

Detailed introduction:

1. Installation:

The entire installation process can be divided into the following steps:

1) Obtain the application software: obtain it by downloading and purchasing a CD;

2) Decompress files: Generally, tar packages will be compressed again, such as gzip, bz2, etc., so you need to decompress them first. If it is the most common gz format, you can execute: "tar –xvzf package name" to complete the decompression and unpacking work in one step. If not, use decompression software first, and then execute "tar –xvf decompressed

tar package" to unpack;

3) Read the attached INSTALL file and README file;

4) Execute the "./configure" command to prepare for compilation;

5) Execute the "make" command to compile the software;

6) Execute "make install" to complete Installation;

7) Execute "make clean" to delete the temporary files generated during installation.

Okay, you’re done. We can now run the application. But at this time, some readers will ask, how do I execute it? This is also a Linux-specific problem. In fact, generally speaking, the executable files of Linux application software will be stored in the /usr/local/bin directory! However, this is not a "one-size-fits-all" truth. The most reliable thing is to look at the INSTALL and README files of the software, which usually have instructions.

2. Uninstall:

Usually software developers rarely consider how to uninstall their own software, and tar only completes the packaging work, so there is no Provide a good uninstall method. So does that mean it can’t be uninstalled? In fact, no, there are two software that can solve this problem, namely Kinstall and Kife. They are golden partners for installing and uninstalling tar packages.

5. Installation method of tar.bz2 source code package:

#1. Find the corresponding software package, such as soft.tar.bz2, download it to a directory on this machine;

2. Open a terminal and su - to become the root user;

3. cd the directory where soft.tar.bz2 is located;

4, tar -xjvf soft.tar.bz2 //Generally, a soft directory will be generated

5, cd soft

6, ./configure

7, make

8, make install

Six, apt installation: (install deb package)

##1 , open a terminal, su - to become the root user;

2. apt-cache search soft Note: soft is the name or related information of the software you are looking for

3. If found in 2 If you have installed the software soft.version, use the apt-get install soft.version command to install the software

Note: As long as you have access to the Internet, you only need to use apt-cache search to find the software, and use apt-get install software

Detailed introduction:

apt-get is a package management tool for debian and ubuntu distributions, which is very similar to the yum tool in Red Hat. The apt-get command generally requires root privileges to execute, so it is generally followed by the sudo command example sudo apt-get xxxx

    ##apt-get install packagename - install a new software package (see aptitude below )
  • apt-get remove packagename——Uninstall an installed software package (retain the configuration file)
  • apt-get –purge remove packagename - Uninstall an installed software package (delete configuration file)
  • dpkg –force-all –purge packagename – Some software is difficult to uninstall and blocks other software You can use this for applications, but it’s a bit risky.
  • apt-get autoremove——Because apt will back up all installed or uninstalled software on the hard disk, so if you need space, you can use this command to delete the software you have deleted. Lost software.
  • apt-get autoclean - Run this command regularly to clear the .deb files of uninstalled packages. In this way, a lot of disk space can be freed up. If the need is very urgent, you can use apt-get clean to free up more space. This command will delete the .deb files of the installed software packages together.
  • apt-get clean——This command will also delete the backup of the installed software, but this will not affect the use of the software.
  • apt-get upgrade——Update all installed software packages
  • apt-get dist-upgrade——Upgrade the system to the new Version
  • apt-cache search string——Search for string in the package list
  • apt-cache showpkg pkgs——Display software packages information.
  • apt-cache stats - Check how many software are in the library
  • apt-cache dumpavail - Print the list of available software packages.
  • apt-cache show pkgs - displays package records, similar to dpkg –print-avail.
  • apt-cache pkgnames - print the names of all packages in the package list (You need to run this command regularly to ensure that your package list is up to date)
  • Simply put: dpkg can only install deb packages that have been downloaded to the local machine. apt- get can download and install deb packages online and update the system. It can also automatically handle dependency issues between packages, which is something that the dpkg tool does not have.

7. Bin file installation: If the name of the software you download is soft.bin, generally The following is an executable file. The installation method is as follows:

1. Open a terminal and su - to become the root user;

2. chmod x soft.bin

3. ./soft.bin //Run this command to install the software

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What are the ways to install software in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Unable to log in to mysql as root Unable to log in to mysql as root Apr 08, 2025 pm 04:54 PM

The main reasons why you cannot log in to MySQL as root are permission problems, configuration file errors, password inconsistent, socket file problems, or firewall interception. The solution includes: check whether the bind-address parameter in the configuration file is configured correctly. Check whether the root user permissions have been modified or deleted and reset. Verify that the password is accurate, including case and special characters. Check socket file permission settings and paths. Check that the firewall blocks connections to the MySQL server.

Solutions to the errors reported by MySQL on a specific system version Solutions to the errors reported by MySQL on a specific system version Apr 08, 2025 am 11:54 AM

The solution to MySQL installation error is: 1. Carefully check the system environment to ensure that the MySQL dependency library requirements are met. Different operating systems and version requirements are different; 2. Carefully read the error message and take corresponding measures according to prompts (such as missing library files or insufficient permissions), such as installing dependencies or using sudo commands; 3. If necessary, try to install the source code and carefully check the compilation log, but this requires a certain amount of Linux knowledge and experience. The key to ultimately solving the problem is to carefully check the system environment and error information, and refer to the official documents.

How to solve mysql cannot be started How to solve mysql cannot be started Apr 08, 2025 pm 02:21 PM

There are many reasons why MySQL startup fails, and it can be diagnosed by checking the error log. Common causes include port conflicts (check port occupancy and modify configuration), permission issues (check service running user permissions), configuration file errors (check parameter settings), data directory corruption (restore data or rebuild table space), InnoDB table space issues (check ibdata1 files), plug-in loading failure (check error log). When solving problems, you should analyze them based on the error log, find the root cause of the problem, and develop the habit of backing up data regularly to prevent and solve problems.

Can mysql run on android Can mysql run on android Apr 08, 2025 pm 05:03 PM

MySQL cannot run directly on Android, but it can be implemented indirectly by using the following methods: using the lightweight database SQLite, which is built on the Android system, does not require a separate server, and has a small resource usage, which is very suitable for mobile device applications. Remotely connect to the MySQL server and connect to the MySQL database on the remote server through the network for data reading and writing, but there are disadvantages such as strong network dependencies, security issues and server costs.

Unable to access mysql from terminal Unable to access mysql from terminal Apr 08, 2025 pm 04:57 PM

Unable to access MySQL from the terminal may be due to: MySQL service not running; connection command error; insufficient permissions; firewall blocks connection; MySQL configuration file error.

What is the most use of Linux? What is the most use of Linux? Apr 09, 2025 am 12:02 AM

Linux is widely used in servers, embedded systems and desktop environments. 1) In the server field, Linux has become an ideal choice for hosting websites, databases and applications due to its stability and security. 2) In embedded systems, Linux is popular for its high customization and efficiency. 3) In the desktop environment, Linux provides a variety of desktop environments to meet the needs of different users.

Monitor MySQL and MariaDB Droplets with Prometheus MySQL Exporter Monitor MySQL and MariaDB Droplets with Prometheus MySQL Exporter Apr 08, 2025 pm 02:42 PM

Effective monitoring of MySQL and MariaDB databases is critical to maintaining optimal performance, identifying potential bottlenecks, and ensuring overall system reliability. Prometheus MySQL Exporter is a powerful tool that provides detailed insights into database metrics that are critical for proactive management and troubleshooting.

How to solve the problem of missing dependencies when installing MySQL How to solve the problem of missing dependencies when installing MySQL Apr 08, 2025 pm 12:00 PM

MySQL installation failure is usually caused by the lack of dependencies. Solution: 1. Use system package manager (such as Linux apt, yum or dnf, Windows VisualC Redistributable) to install the missing dependency libraries, such as sudoaptinstalllibmysqlclient-dev; 2. Carefully check the error information and solve complex dependencies one by one; 3. Ensure that the package manager source is configured correctly and can access the network; 4. For Windows, download and install the necessary runtime libraries. Developing the habit of reading official documents and making good use of search engines can effectively solve problems.

See all articles