In this tutorial we will discuss how to install software packages in Linux whether you have package file or download over the internet.
We just take a review! Computer software is divided in the systems software and application software. Application software is therefore organized in packages.
What is linux software Packages?
A package is basically a file that conceptually contains other files. A package includes one executable. When Linux developers create their software they typically bundle all the executable and data files into a single file called a package file. Packages have different formats. For Example; .RPM, .apk, .deb, etc
We discuss RPM (RedHat Package Manager) which is introduce by RedHat and has been adopted by many other distros (Like Fedora etc).
RPM command is used for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system. We need to be on root when install a package, we can use the rpm command with appropriate options to manage the RPM software packages.
Installing a RPM package
RPM filename has packagename, version, and release and architecture name.
For example, in the tigervnc-1.3.1-3.el7.x86_64.rpm
- Tigervnc – Package Name
- 3.1 – Version
- el7 – Release
- x86_64 – Architecture
RPM commands and Options
Install rpm package using rpm –ivh tigervnc-1.3.1-3.el7.x86_64.rpm
- i – Install
- v – verbose (provide additional details)
- h – Print hash (#) sign as the package archive is unpacked. See below image;
In GUI we can see the package install click on application from taskbar dropdown list will open then move pointer to internet and on the right side we can see as shown in below image;
Query a particular RPM package using rpm –q tigervnc
Query a package we should specify the exact package name after installation to check the installation we can query a particular package and verify as shown below;
Query all installed packages using rpm –qa (a – all install packages)
It shows all packages installed in system.
Information about installed package using rpm –qi tigervnc
List all the file of package using rpm –qlp tigervnc-1.3.1-3.el7.x86_64.rpm
Upgrade package using rpm –Uvh tigervnc-1.3.1-3.el7.x86_64.rpm
Now we have a file and want to check that file belongs to which package then we use rpm –qf filename here I am using lib file as shown below;
Erase a package using rpm –e tigervnc-1.3.1-3.el7.x86_64.rpm
Note: some of packages have dependencies file first we need to install that dependencies file then install the package file.