{"id":5435,"date":"2021-04-02T17:44:32","date_gmt":"2021-04-02T17:44:32","guid":{"rendered":"https:\/\/linuxways.net\/?p=5435"},"modified":"2021-04-02T17:44:32","modified_gmt":"2021-04-02T17:44:32","slug":"how-to-install-rpm-packages-on-centos-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-install-rpm-packages-on-centos-8\/","title":{"rendered":"How to Install RPM Packages on CentOS 8"},"content":{"rendered":"<p>RPM is a packaging format used by most popular Linux distributions such as CentOS, Red hat, and Fedora. In the official CentOS repository, a large number of packages are available that can be installed directly using the yum package manager tool. The RPM packages that are not available in the CentOS Standard repository can be installed easily by activating or enabling the relevant repository. Often, you need to download and manually the rpm packages from the official software pages.<\/p>\n<p>We will elaborate in this tutorial on how to install rpm packages on CentOS 8 system through the command line.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>You need root privileges to execute the administrative commands.<\/p>\n<p>The rpm packages can install on CentOS 8 system by using the following two different ways:<\/p>\n<ol>\n<li>Install rpm package using the yum package manager<\/li>\n<li>Install rpm package using the rpm command<\/li>\n<\/ol>\n<h2><strong>Method 1: Install rpm package using the Yum package manager<\/strong><\/h2>\n<p>Yum is used as a default package manager for CentOS distribution. Using this package manager tool, the user can install, download, update, search and remove packages from the CentOS official repository and can do the same task with the third-party repository. Just launch the terminal window on your CentOS desktop from left sidebar menu and then do the following steps:<\/p>\n<h3><strong>Download the rpm file from the official website<\/strong><\/h3>\n<p>If you are using this method then, download the rpm package from a website. In the following example, the slack rpm file is downloaded from the official download package using the following \u2018wget\u2019 command:<\/p>\n<pre>$\u00a0 wget <a href=\"https:\/\/downloads.slack-edge.com\/linux_releases\/slack-4.9.1-0.1.fc21.x86_64.rpm\">https:\/\/downloads.slack-edge.com\/linux_releases\/slack-4.9.1-0.1.fc21.x86_64.rpm<\/a><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"996\" height=\"367\" class=\"wp-image-5436\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-452.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-452.png 996w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-452-300x111.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-452-768x283.png 768w\" sizes=\"auto, (max-width: 996px) 100vw, 996px\" \/><\/p>\n<h3><strong>Install the rpm file<\/strong><\/h3>\n<p>The downloaded rpm package can be installed on your system by running the following \u2018yum localinstall\u2019 command along with the package name:<\/p>\n<pre>$ sudo yum localinstall filename.rpm<\/pre>\n<p>To install all rpm files from a directory use the following command:<\/p>\n<pre>$ sudo yum localinstall .\/slack-*.rpm<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"584\" class=\"wp-image-5437\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-453.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-453.png 984w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-453-300x178.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-453-768x456.png 768w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/p>\n<p>Here, we are assuming the above rpm file is compatible with your system. So, press \u2018y\u2019 and \u2018Enter\u2019 as a prompt appears on the terminal that will automatically install all dependencies required for this package.<\/p>\n<p>In some cases, RPM packages depend on other packages that are not installed currently on your system. So, if these packages are present in the repository, enabled on your CentOS system. Yum automatically installs all dependencies. But, if dependencies are not available in the repository then, first you need to install these dependencies on your system independently using yum package manager tool.<\/p>\n<p>You can also adopt another option that instead of separately downloading the rpm file, just pass the RPM package URL with following command:<\/p>\n<pre>$ sudo yum localinstall <a href=\"https:\/\/domain.com\/file.rpm\">https:\/\/domain.com\/file.rpm<\/a><\/pre>\n<p>The installed rpm package can also remove from your system using the yum package manager by using the following command:<\/p>\n<pre>$ sudo yum remove file.rpm<\/pre>\n<h2><strong>Method 2: Install RPM package using the rpm tool<\/strong><\/h2>\n<p>Using the rpm tool, you can install, update and remove a package from your CentOS system.<\/p>\n<p>Use the following command to install any rpm package:<\/p>\n<pre>$ sudo rpm -ivh file.rpm<\/pre>\n<p>In the above command -v shows the verbose and h shows the hash marked progress bar. However, if this package depends on other packages then, during the installation it will list the names of missing dependencies on the terminal. Then, you need to download and install manually all those dependencies.<\/p>\n<p>You can also use the URL of rpm package with the following command instead of downloading the rpm package.<\/p>\n<pre>$ sudo rpm -ivh <a href=\"https:\/\/domain.com\/file.rpm\">https:\/\/domain.com\/file.rpm<\/a><\/pre>\n<p>Use option \u2018-U\u2019, to update any rpm package using the rpm tool as follows:<\/p>\n<pre>$ sudo rpm -Uvh file.rpm<\/pre>\n<p>To install a RPM package without its dependencies, use the following terminal command:<\/p>\n<pre>$ sudo rpm -Uvh --nodeps file.rpm<\/pre>\n<p>To erase or remove the RPM package from your system, use the option \u2018-e\u2019 followed by the rpm file name as follows:<\/p>\n<pre>$ sudo rpm -e file.rpm<\/pre>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>We have mentioned all information about how to install the RPM package on the CentOS 8 system. We have explained two methods through which you can easily download, install, update and erase Rpm packages on your CentOS system. For more understanding, test all those commands with your own RPM packages URL on CentOS\u00a0and in case of any problem give us your feedback via comments.<\/p>","protected":false},"excerpt":{"rendered":"<p>RPM is a packaging format used by most popular Linux distributions such as CentOS, Red hat, and Fedora. In the official CentOS repository, a large number of packages&hellip;<\/p>","protected":false},"author":1,"featured_media":5558,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[93,252],"class_list":["post-5435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos-8","tag-rpm-packages"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=5435"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/5558"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=5435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=5435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=5435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}