Home > Operation and Maintenance > CentOS > How to install rpm package on centos

How to install rpm package on centos

青灯夜游
Release: 2023-01-13 00:22:24
Original
15516 people have browsed it

Installation method: First download the RPM package file; then execute the "yum localinstall rpm package name path" command, you will get a confirmation prompt. If the rpm is compatible with the user system and meets all dependencies, enter " y" to install the RPM package.

How to install rpm package on centos

#The operating environment of this tutorial: centos7 system, thinkpad t480 computer.

centos uses YUM to install RPM packages

Yum is the default package manager tool in CentOS. It is used to install, remove, download, query and update packages from the official CentOS repository as well as other third-party repositories.

The first step is to download the RPM file you want to install:

wget https://example.com/file.rpm
Copy after login

To install the package, follow the yum localinstall command with the path to the package name:

sudo yum localinstall file.rpm
Copy after login

Yum You will be prompted to confirm. Assuming it is compatible with your system and all dependencies are met, entering y will install the RPM package.

If an RPM package depends on other packages that you have not installed, and those packages are available in a repository enabled on your system, all dependencies will be installed. Otherwise, yum will print a list of all missing dependencies that you must download and install the packages manually.

Instead of automatically downloading and then installing the RPM package, you can pass the URL directly to the RPM package yum localinstall:

sudo yum localinstall https://example.com/file.rpm
Copy after login

If you want to update an RPM package that has been installed using yum, use install with The same process applies to software packages.

If for some reason you want to remove an installed package, use the standard yum remove command followed by the package name:

sudo yum remove file.rpm
Copy after login

Recommended related tutorials: centos tutorial

The above is the detailed content of How to install rpm package on centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template