package manager Archives - The Linux GURUS https://thelinuxgurus.com/tag/package-manager/ Learn Linux & DevOPS from THE LINUX GURUS Fri, 04 Jun 2021 14:39:23 +0000 en-US hourly 1 https://i0.wp.com/thelinuxgurus.com/wp-content/uploads/2020/01/cropped-thelinuxgurus_transparent_name.png?fit=32%2C32&ssl=1 package manager Archives - The Linux GURUS https://thelinuxgurus.com/tag/package-manager/ 32 32 148921671 How to install PIP3 on CentOS/RHEL & use it https://thelinuxgurus.com/how-to-install-pip3-on-centos-rhel-use-it/ https://thelinuxgurus.com/how-to-install-pip3-on-centos-rhel-use-it/#comments Sun, 02 Feb 2020 04:38:40 +0000 https://thelinuxgurus.com/?p=1079 PIP is a recursive acronym that stands for “PIP Installs Python” (Confusing, right ?). PIP is basically a package manager to manage python-based applications &...

The post How to install PIP3 on CentOS/RHEL & use it appeared first on The Linux GURUS.

]]>
PIP is a recursive acronym that stands for “PIP Installs Python” (Confusing, right ?). PIP is basically a package manager to manage python-based applications & packages. PIP is used to install, remove or upgrade many of the python packages available in a repository known as Python Package Index or PyPI, in short.

Think PIP as YUM or APT for Python packages. In this tutorial, we will learn to install PIP on CentOS machines. Let’s discuss pre-requisites first.


Pre-requisites

To install the latest version of Python 3 on your system, please refer to the detailed article HERE.

Also read: How to uninstall Python from Windows, Linux & MacOS


Install PIP3 on CentOS

Once we have required python 3 version installed (we installed python 3.7 installed on our system using the above-mentioned tutorial), we can then proceed to install the respective PIP version on our system, which will be ‘python37-pip’ for us.

To install PIP3, we need to first install the EPEL repository on our system first (detailed tutorial HERE) & then install PIP3 using yum from the EPEL repository. Commands to install EPEL repository are mentioned below,

RHEL/CentOS 8

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

RHEL/CentOS 7

# rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm

RHEL/CentOS 6 (64 Bit)

# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

RHEL/CentOS 6 (32 Bit)

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Now that we have EPEL repo installed on our system, we can execute the following command to install PIP3 on CentOS,

# yum install python37-pip

That’s it, Python PIP3 is installed on our system. Let’s discuss some of the PIP3 commands that we can use to manage the python packages.


PIP commands

To install a package using PIP, use the following command,

# pip3 install package_name

To install a number of packages, we can create a file & mention all the packages we need to have to install ed on our system. Then run the following command to install all the packages,

# pip3 install -r packages.txt


To remove a package, run

# pip3 uninstall package_name


Command to only download a package & not install it is,

# pip3 download package_name


To list installed packages,

# pip3 list


For a complete list of options that can be used with PIP command, run

# pip3 –help

That’s it for this tutorial on how to install PIP3 on CentOS. Please feel free to send in any questions or queries using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post How to install PIP3 on CentOS/RHEL & use it appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/how-to-install-pip3-on-centos-rhel-use-it/feed/ 1 1079
How to install PIP3 on Ubuntu & use it https://thelinuxgurus.com/how-to-install-pip3-on-ubuntu-use-it/ https://thelinuxgurus.com/how-to-install-pip3-on-ubuntu-use-it/#respond Sun, 02 Feb 2020 04:32:10 +0000 https://thelinuxgurus.com/?p=1076 PIP is a recursive acronym that stands for “PIP Installs Python” (Confusing, right ?). PIP is basically a package manager to manage python-based applications &...

The post How to install PIP3 on Ubuntu & use it appeared first on The Linux GURUS.

]]>
PIP is a recursive acronym that stands for “PIP Installs Python” (Confusing, right ?). PIP is basically a package manager to manage python-based applications & packages. PIP3 is basically used with Python3, is used to install, remove or upgrade many of the python3 packages available in a repository known as Python Package Index or PyPI, in short.

Recommended Read: Install SNAP on Ubuntu & CentOS/RHEL

Also Read: Ultimate guide to install PYTHON from source

Think PIP as YUM or APT for Python packages. In this tutorial, we will learn to install PIP3 on Ubuntu machines. Let’s discuss pre-requisites first.


Pre-requisites

We should have Python installed on our system, which most of the Linux systems already have installed by default. But we can install python 3 on Ubuntu with the following command as well,

$ sudo apt-get update

$ sudo apt-get install python3

You can also refer to our detailed tutorial here for python 3 installation. Now next step would be to discuss how to install PIP on Ubuntu.


Install PIP3 on Ubuntu

Installation is pretty simple & straight forward for installing pip3 on Ubuntu. We can install PIP3 using the following commands,

$ sudo apt-get update && sudo apt-get upgrade -y

$ sudo apt-get install python3-pip

Once PIP is installed, we can use it to manage packages. Let’s discuss some commands for using Python PIP.


PIP3 commands

To install a package using PIP, use the following command,

$ pip3 install package_name

To install a number of packages, we can create a file & mention all the packages we need to have to install ed on our system. Then run the following command to install all the packages,

$ pip3 install -r packages.txt


To remove a package, run

$ pip3 uninstall package_name


Command to only download a package & not install it is,

$ pip3 download package_name


To list installed packages,

$ pip3 list


For a complete list of options that can be used with PIP command, run

$ pip3 –help

That’s it for this tutorial on how to install PIP3 on Ubuntu. Please feel free to send in any questions or queries using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post How to install PIP3 on Ubuntu & use it appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/how-to-install-pip3-on-ubuntu-use-it/feed/ 0 1076
Install SNAP on Ubuntu & CentOS/RHEL https://thelinuxgurus.com/install-snap-on-ubuntu-centos-rhel/ https://thelinuxgurus.com/install-snap-on-ubuntu-centos-rhel/#respond Sun, 02 Feb 2020 04:26:24 +0000 https://thelinuxgurus.com/?p=1072 Snap is a software deployment & package management system, it has containerized software packages that are simple to create & install. Snap packages are safe...

The post Install SNAP on Ubuntu & CentOS/RHEL appeared first on The Linux GURUS.

]]>
Snap is a software deployment & package management system, it has containerized software packages that are simple to create & install. Snap packages are safe to run, they auto-update & we can also roll-back the changes easily.

The main advantage of using snap is that it combines a package & all the required dependencies into a single package, which allows each package to work on all Linux distribution without any issue.

Recommended Read: Beginner’s guide to Backup Postgres Database

Also Read: Conda Commands cheat sheet for Beginners

The name snap comes from snappy which was a package management system for Ubuntu phones. So also In this tutorial, we will learn to install Snap on CentOS & Ubuntu systems. Once we install snap on Linux machines, we will also discuss some mostly used snap commands for package management.

Install Snap on Ubuntu

Starting with Ubuntu 16.04, the snap comes pre-installed on the system. But if it’s not installed or you need to install it on other Ubuntu versions, then the command to do so is,

$ sudo apt update && sudo apt install snapd

Once the package has been installed, we need to log out & then log back in to update all the snap’s paths correctly. We can then use snap for package management using the commands mentioned below.

Install Snap on CentOS/RHEL

Snap on CentOS & RHEL is not available with default repository & we need to install 3rd party repository i.e. EPEL. You can refer to our tutorial on how to install EPEL repository or you can try the following command, which works on the new versions,

$ sudo yum install epel-release

Now we can start the snap installation with the following command,

$ sudo yum install snapd

After installation, we need to enable the snap package,

$ sudo systemctl enable –now snapd.socket

We now have snap installed on our systems & if we also want to enable classic snap support then we can create a system link for the same,

$ sudo ln -s /var/lib/snapd/snap /snap

Now we can either restart or log out & log back in to make sure that all the snapd paths are updated.

Snap Commands for Beginners

After snap installation, we must be aware of the commands that can be used for the package management using snap. Below mentioned are some commands that you should know for package management using snap,

  • Install Packages

To install a package using snap, execute the following from the terminal

$ snap install package

  • Remove package

To remove a package from the system, run

$ snap remove package

  • Update package

As mentioned above, snap packages are updated automatically & we might not be required to run the below-mentioned command at all but none the less, for your information,

$ snap refresh

This command will update all the snap packages.

  • Find packages

To find a package in the snap repository, execute the following command,

$ snap find package_query

  • List installed packages

To check all the installed packages on your system, run

$ snap list

  • Information for a package

To check complete information for a package, use the following

$ snap info package

This concludes our tutorial on how to install snap on Linux systems. Please feel free to send in any questions, queries or suggestions using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Install SNAP on Ubuntu & CentOS/RHEL appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/install-snap-on-ubuntu-centos-rhel/feed/ 0 1072
Beginner’s guide to using DNF command in Linux https://thelinuxgurus.com/beginners-guide-to-using-dnf-command-in-linux/ https://thelinuxgurus.com/beginners-guide-to-using-dnf-command-in-linux/#respond Sat, 04 Jan 2020 14:22:55 +0000 https://thelinuxgurus.com/?p=890 DNF is the package manager that was earlier used in Fedora as a default package manager but with the start of RHEL 8, it is...

The post Beginner’s guide to using DNF command in Linux appeared first on The Linux GURUS.

]]>
DNF is the package manager that was earlier used in Fedora as a default package manager but with the start of RHEL 8, it is now available a package manager choice along with YUM. In the future, it might be completely removed from RHEL versions. Yum has some problems associated with it, The problems like poor performance, high memory usage, slowness for dependency resolution, etc. All these problems have been resolved with DNF.

Recommended Read: Examples on how to use YUM command in Linux

Also Read: Examples on how to use RPM command in Linux

In this tutorial, we will learn to use DNF command in Linux,


Examples of DNF command in Linux


1- Install package and depend­encies

To install a package & its related dependencies, the command is,

# dnf install packa­ge_­name

If required, we can install local package (rpm package) and all its depend­encies with the following command,

# dnf install /path­/to­/lo­cal­/rpm

To reinstall a package, command is

# dnf reinstall packa­ge_­name


2- Install a package for which we only have a file

If we don’t know the package name & want to install the package for which we only have file (maybe config file), then we can use the following command to install it,

# dnf install /path­/to­/fi­le


3- Upgrade packages

The command to upgrade all system packages is,

# dnf upgrade

To update packages to major patchset and security

# dnf upgrad­e-m­ini­mal

To check if updates are available for packages,

# dnf check-­upd­ate


4- Downgrade packages

To downgrade the installed packages to older versions, the command is

# dnf downgrade packa­ge_­name


5- Uninstall or remove a package

The command to remove or uninstall a package from the system is,

# dnf remove packa­ge_­name

# dnf erase package_name

& if we have some orphaned packages (like some replaces packages that are not required anymore, ex old kernels etc) on our system that we want to remove, we can use the following command,

# dnf autore­move


6- Overview of how many groups are installed and available

To get the list of how many group packages are installed & how many are available, we can use

# dnf group summary group

To get the list of all packages for a group, we can use the command,

# dnf group info group

To only check a particular group,

# dnf group list group_name


7- Install group

Command to install the group is,

# dnf group install –with­-op­tional group_name


8- Remove a group

To remove an installed group of packages, use

# dnf group remove group_name


9- Upgrade a single group

To upgrade the packages from the group and upgrades the group itself

# dnf group upgrade group


10- Update all packages

To update packages to the latest version, execute the following command,

# dnf distro­-sync


11- Check information a package

To show info of packa­ge_­name, run

# dnf info packa­ge_­name


12- Check which package provides a file

To show which package provides /path­/to­/file

# dnf provides path/­to/­file


13- Perform a search term for a package

To search for term in package name and summary

# dnf search term


14- Get dnf history

To get list of all dnf transa­ction’s history

# dnf history list

History shows transaction id, to get information for a particular transaction,

# dnf history info trans­act­ion_id

To redo particular trans­action from history, run,

# dnf history redo trans­act­ion_id

To rollback a particular transaction,

# dnf history rollback trans­act­ion_id

To undo a transaction,

# dnf history undo trans­act­ion_id


15- Show user-installed packages outside dnf

To only show all instal­l only packages, packages installed outside of DNF and packages not installed as a dependency,

# dnf history userin­sta­lled


16- List repositories

To show enabled repolist,

# dnf repolist –enabled

To show disabled repolist,

# dnf repolist –disabled

To list all repos, enabled, disabled & all known repos

# dnf repolist –ena­ble­d|­–­dis­abl­ed­|-­-all


17- Search repo for selected packages

To search the available DNF reposi­tories for selected packages,

# dnf repoqu­ery


18- Add a remote repository

To add a remote repository to the system,

# dnf config­-ma­nager –add-­rep­o=­URL add remote repository


19- Download a package

To only download a package & not install it on the system, run

# dnf download package_name


20- List packages

To list installed packages on the system,

# dnf list –installed

List available packages,

# dnf list –available

List recent packages,

# dnf list –recent

List all packages,

# dnf list –all

We now end our tutorial on how to use DNF command in Linux. Please do let us know your suggestions, questions or queries using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Beginner’s guide to using DNF command in Linux appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/beginners-guide-to-using-dnf-command-in-linux/feed/ 0 890
Examples on how to use RPM command in Linux https://thelinuxgurus.com/examples-on-how-to-use-rpm-command-in-linux/ https://thelinuxgurus.com/examples-on-how-to-use-rpm-command-in-linux/#respond Tue, 31 Dec 2019 05:38:12 +0000 https://thelinuxgurus.com/?p=871 RPM (RedHat Package Manager) is the default package manager for RedHat & for many other Linux distributions based on it like CentOS, Oracle Linux, and...

The post Examples on how to use RPM command in Linux appeared first on The Linux GURUS.

]]>
RPM (RedHat Package Manager) is the default package manager for RedHat & for many other Linux distributions based on it like CentOS, Oracle Linux, and Amazon Linux among others.

RPM is used for processing the packages with .rpm extension, we can install, uninstall, upgrade .rpm packages with RPM. RPM maintains a database of installed packages which allows us to query information regarding packages and such.

Recommended Read: Important POSTGRESQL commands you should know

Also Read: Scheduling CRON Jobs with Crontab for Beginners

In this tutorial, we will learn to use the RPM command in Linux with some examples.


The syntax for using rpm command in Linux:-

# rpm -(options) package_name

Now let’s discuss some examples so that we have a better understanding.

Examples of rpm

– Installing an rpm package

To install a package, we will use the following command,

# rpm –ivh packge_name.rpm

Here, -i options is for installing a package, -v is for verbose (additional details of what’s being done), -h is for showing percentage completion with # markings.

We can also use the rpm command with upgrade option to install a package

# rpm -Uvh fuse-ntfs-3g-2013.1.13-2.el7.rf.x86_64.rpm


– Upgrade an rpm package

To upgrade an already installed package, use ‘U’ option with rpm common,

# rpm –Uvh fuse-ntfs-3g-2013.1.13-2.el7.rf.x86_64.rpm


– Removing a package

To remove a package, use rpm command with option ‘e’,

# rpm –evh httpd


– Checking if a package is installed or not

To check whether a package has been installed or not, we can query the package with option ‘q’,

# rpm –q httpd


– List all the files for a package

To check the list of all the files for installed rpm packages, use the option ‘l’ with ‘q’,

# rpm –ql httpd


– Checking dependencies before installing

To install a rpm package, all dependencies must be installed first. We can check the list of dependencies for a package with the following command,

# rpm –qpR httpd-2.4.6-2-45.el7.centos.x86_64.rpm

Option ‘p’ provides the functionality provided package, ‘R’ provides the dependencies for the package.


– Installing rpm without dependencies

Though all the dependencies are required to be installed before we can install & use a package. We can also install a package without installing dependencies (whether it will work or not is another story),

# rpm –ivh –nodeps httpd-2.4.6-2-45.el7.centos.x86_64.rpm

‘-nodeps’ is what allows us to install a package without dependencies. The same option can also be used to uninstall a package without dependencies,

# rpm –evh –nodeps httpd


– List all installed packages

Check the list of all installed packages using the following command,

# rpm –qa

We can also check recently installed packages with the above-mentioned command by just adding ‘–last’ option in the end,

# rpm -qa –last


– List info about a single package

To get information about an installed package, use

# rpm –qi perl

If we need the package information without installing it, we can use the following command,

# rpm -qip httpd-2.4.6-2-45.el7.centos.x86_64.rpm


– Checking which file belongs to which package

If we need to find out which files belong to which package, we will use the following command,

# rpm –qf /var/log/httpd


– Verify package

To verify a single package against the rpm database, use

# rpm –Vp httpd-2.4.6-2-45.el7.centos.x86_64.rpm

To verify all the installed package on the system, use

# rpm -Va

This was our tutorial on how to use rpm command in Linux, please feel free to send in any questions or queries using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.

The post Examples on how to use RPM command in Linux appeared first on The Linux GURUS.

]]>
https://thelinuxgurus.com/examples-on-how-to-use-rpm-command-in-linux/feed/ 0 871