Package Management – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Mon, 26 Sep 2022 11:58:41 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How To Install PIP on Debian 11 Linux https://tecadmin.net/how-to-install-pip-on-debian-11/ https://tecadmin.net/how-to-install-pip-on-debian-11/#respond Fri, 01 Oct 2021 13:33:00 +0000 https://tecadmin.net/?p=27915 Pip is a popular package management tool for Python. It allows the Python developers to install and manage additional Python libraries in their applications. This is a similar application to nvm for Node.js and composer for PHP. Pip stands for Preferred Installer Program. Rather than a package management utility, Pip can create a completely isolated [...]

The post How To Install PIP on Debian 11 Linux appeared first on TecAdmin.

]]>
Pip is a popular package management tool for Python. It allows the Python developers to install and manage additional Python libraries in their applications. This is a similar application to nvm for Node.js and composer for PHP. Pip stands for Preferred Installer Program.

Rather than a package management utility, Pip can create a completely isolated environment for the Python application. In this tutorial, you will learn about the installation of Pip on the Debian 11 Linux system.

Prerequisites

This tutorial assuming that you already have installed Python 3 on your system. Next login to the Debian 11 system with sudo privileged account access.

Users have fresh installed Debian 11, can follow the initial server setup instructions.

Installing Pip for Python 3

You need to install separate Pip versions for Python3 and Python2. As you already have Python3 installed your system. Open a terminal with a sudo privileged account and run the below command to install Pip for Python3 on Debian 11 Linux system.

The following command will install Pip3 for Python3:

sudo apt update 
sudo apt install python3-pip 

Once the installation is completed successfully, check the Pip3 version by executing:

pip3 -V 
Output:
pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)

You may see a different Pip3 version on your system. Now, Pip3 is ready to use on your system.

Installing Pip for Python 2

Python 2 is reached to end of life and is no more maintained. Also, it is not installed default on Debian 11 Linux. We suggest using Python 3 for your new applications.

But if your existing application still requires Python 2, then you can install it from default repositories. To install Python2.7 packages type:

sudo apt install python2 

Now, install Pip for Python 2. Use the following command to download the Pip2 installer on your system.

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o /tmp/get-pip.py 

Then run the downloaded Python script with python2 binary.

sudo python2 /tmp/get-pip.py 

The above command will install and configure Pip for Python2 on your system. To verify the installation and check installed Pip2 version, type:

pip -V 
Output:
pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

Conclusion

This tutorial helps you to install Pip for Python3 on Debian 11 Linux. Additionally provided the instructions for installing Pip for Python2. You can follow these instructions to create an isolated environment.

The post How To Install PIP on Debian 11 Linux appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-pip-on-debian-11/feed/ 0
How to Install Yarn on MacOS https://tecadmin.net/install-yarn-macos/ https://tecadmin.net/install-yarn-macos/#respond Thu, 26 Nov 2020 15:14:34 +0000 https://tecadmin.net/?p=23698 Yarn is a new package manager for JavaScript and the primary tool used by Facebook to manage its source code. As of this writing, Yarn has approximately 370 contributors and is used by notable tech companies such as Airbnb, Dropbox, Uber, Google, and Netflix. If you’re reading this article, it means that you’re probably interested [...]

The post How to Install Yarn on MacOS appeared first on TecAdmin.

]]>
Yarn is a new package manager for JavaScript and the primary tool used by Facebook to manage its source code. As of this writing, Yarn has approximately 370 contributors and is used by notable tech companies such as Airbnb, Dropbox, Uber, Google, and Netflix. If you’re reading this article, it means that you’re probably interested in installing Yarn on your Mac so you can use it to manage your personal projects or help teammates collaborate effectively at work.

In this tutorial, we’ll show you how to install Yarn on Mac OS in five simple steps.

Installing Yarn on macOS

Choose one of the below-given methods to install Yarn on the macOS system. All the methods are secure and easy to follow.

  • Method 1 – Using Homebrew
  • You can install Yarn using the Homebrew package manager on the macOS system. Homebrew is a package manager for macOS operating system that provides an easier way to install and manage packages on your system.

    To install Yarn on macOS, open a terminal and type:

    brew install yarn 
    

    Make sure you have installed Homebrew on your macOS system.

  • Method 2 – Using Shell Script
  • Another way to easily install Yarn on macOS. This is a shell script provided officially for installing Yarn on different Unix/Linux operating systems.

    You can install Yarn by running the following code in your terminal:

    curl -o- -L https://yarnpkg.com/install.sh | bash 
    

    The script will verify the GPG signature first before the installation. So it is also a secure way to install Yarn on macOS systems.

Check Yarn Version

Once the Yarn installation is completed, execute the following command to verify the yarn version.

yarn --version 

1.22.4

Working with Yarn Package Manager

As of now, you have successfully installed Yarn on the macOS system. Let’s explore some basic uses of the Yarn command line.

  1. Create and initialize a new project
  2. Use yarn init under a empty folder to create new project.

    yarn init 
    

    The command will go through an interactive session asking a few questions. Input the required values and press Enter. This will generate a package.json file in current directory.

    yarn init v1.22.4
    question name (new_project): my-package
    question version (1.0.0):
    question description: Test package
    question entry point (index.js):
    question repository url: https://github.com/tecadmin/my-yarn-package
    question author: Rahul
    question license (MIT):
    question private:
    success Saved package.json
    Done in 84.90s.
    
  3. Adding a new module
  4. Use yarn add command to install new dependency to your existing application. You need to specify the package name to add. It will also make a entry in package.json as dependency.

    yarn add [package] 
    

    Also, you can specify the package version or tag to select the correct package version instead of the latest version.

    yarn add [package]@[version] 
    yarn add [package]@[tag] 
    
  5. Upgrading a dependency
  6. Use the yarn upgrade command to upgrade already installed packages in your application.

    yarn upgrade [package] 
    

    You can also specify a version or tag name to upgrade to specific versions.

    yarn upgrade [package]@[version] 
    yarn upgrade [package]@[tag] 
    
  7. Removing a dependency
  8. If any of the packages is not more required, remove it from your application.

    yarn remove [package] 
    
  9. Using yarn install
  10. This will install all the packages dependencies defined in package.json file.

    yarn install 
    

    yarn install is the default action of the yarn command without passing any subcommand.

Conclusion

This tutorial explained to you to install yarn on the macOS system. Also explored the details to work with the yarn package manager.

The post How to Install Yarn on MacOS appeared first on TecAdmin.

]]>
https://tecadmin.net/install-yarn-macos/feed/ 0
Working with the Snap Package in Linux https://tecadmin.net/linux-snap-packages/ https://tecadmin.net/linux-snap-packages/#respond Sat, 16 May 2020 13:48:58 +0000 https://tecadmin.net/?p=16540 What is Snap? Snap or Snappy is a package management system developed by Canonical for the Linux operating system. The packages are called snaps, and the tool for using them is snapd, which works across a range of Linux distributions. A Snap package are containerized software package that contains all the requirements in it. The [...]

The post Working with the Snap Package in Linux appeared first on TecAdmin.

]]>
What is Snap?

Snap or Snappy is a package management system developed by Canonical for the Linux operating system. The packages are called snaps, and the tool for using them is snapd, which works across a range of Linux distributions. A Snap package are containerized software package that contains all the requirements in it. The snaps are easy-to-install packages and provide auto-update features.

What is Snapcraft?

Snapcraft is a powerful command-line tool for developers to create new Snap packages from their programs. It can run on a Linux system as well as on Windows and macOS. Snapcraft reads a simple and declarative file and runs the build for us to build snap packages.

You can install a wide range of packages available on the Snapcraft store in a single command.

How to Install Snapd on Linux

Snapd is a REST API daemon for managing snap packages. It also provides a snap command-line utility for client machines to interact with the snapd daemon. Users can interact with it by using the snap client.

Most of the latest Linux operating systems are pre-installed with the snapd daemon service. But if your Linux machine doesn’t have snapd installed, use one of the following commands to install it.

  • To install Snapd on Debian based systems, type:
    sudo apt install snapd 
    
  • To install Snapd on Redhat based systems, type:
    sudo dnf install snapd 
    

Once the installation is finished, snapd daemon will be up and running on your system. You can find the status of the service with the following command.

sudo systemctl status snapd 

Searching for Snap Packages

Snap command line utility provides you option to search for available snap packages/applications on snapcraft store. You can directly search applications on online Snapcrat store.

You can also use find sub-command followed by the package name to search. To find Snap packages, type:

sudo snap find postman 

How to Search a Snap Package

How to Install a Snap Package

You can install any package available on snapcraft store with the following command. To install package type:

sudo snap install postman 

Snappy also maintains the different channels for package installation. This allows users to install any package stable version, beta, or daily updated versions. Here are the 4 major channels available for snap packages:

  • stable: Stable version of packages, recommended for the most of users or production environments.
  • candidate: It provides packages with updates prior to stable deployment, or those verifying whether a specific issue has been resolved.
  • beta: for users wanting to test the latest features, typically outside of a production environment.
  • edge: for users wanting to closely track development.

You can use --channel to specify the channel name to install the package from It. Channel is a snap concept that stands for the release of a snap.

To install beta release:

sudo snap install postman --channel=beta

To install edge release:

sudo snap install postman --channel=edge

List Installed Snap Packages

Use snap list command to view all the installed snaps on your system. To view installed packages, type:

sudo snap list 

How to List installed Snap packages

How to Upgrade Snap Packages

The Snap packages are automatically update by default. You can also update it manually using the command line. To find out the available updates for the packages, execute:

sudo snap refresh --list 

Use the below command to update snap packages on your system.

sudo snap refresh 

How to Upgrade Snap packages

How to Downgrade a Snap Package

Snapd also allows reverting any package to the previous version. If you accidentally updated for the package or you don’t like the upgraded package. Use the following command to revert any package:

sudo snap revert <package_name> 

This will revert both the snap revision and the data associated with the application.

Removing Snap Packages

You can remove snap packages anytime, whenever you don’t’ required. Run the following command with the package name to remove from your system:

sudo snap remove <package_name> 

How to Remove a Snap Package

The above command will remove all the associated user data, applications and dependencies from the systems. It will also stop and remove all the associated services with that package.

Conclusion

In this tutorial, you have learned about Linux snap packages. You get a basic understanding of installing, updating, and removing the snap packages on a Linux system.

The post Working with the Snap Package in Linux appeared first on TecAdmin.

]]>
https://tecadmin.net/linux-snap-packages/feed/ 0
How to Install EPEL and REMI Repository on CentOS/RedHat 7/6 https://tecadmin.net/install-epel-and-remi-repository-on-centos-and-redhat/ https://tecadmin.net/install-epel-and-remi-repository-on-centos-and-redhat/#respond Mon, 12 Jan 2015 05:15:14 +0000 https://tecadmin.net/?p=6851 EPEL is known as “Extra Packages for Enterprise Linux” repository having lots of extra packages which is not added in official repositories. REMI is a third party repository provides latest version of packages which is already included in official repositories of CentOS and Red Hat. This article will help you to install EPEL and REMI [...]

The post How to Install EPEL and REMI Repository on CentOS/RedHat 7/6 appeared first on TecAdmin.

]]>
EPEL is known as “Extra Packages for Enterprise Linux” repository having lots of extra packages which is not added in official repositories. REMI is a third party repository provides latest version of packages which is already included in official repositories of CentOS and Red Hat.

This article will help you to install EPEL and REMI repository on CentOS and Red Hat 7/6/5 systems.

Install EPEL Repository

EPEL release package is available under default CentOS repositories. So use the following command to install EPEL yum repository on your CentOS/RHEL 7/6/5 systems.

yum install epel-release

In the case of command doesn’t work for you, use one of below commands.

### For CentOS/RHEL 7 ###
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm

### For CentOS/RHEL 6 ###
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Install REMI Repository

Use following commands to install REMI yum repository on your CentOS/RHEL 7/6/5 systems. Make sure you already have installed EPEL repository before installing REMI.

### For CentOS/RHEL 7 ###
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

### For CentOS/RHEL 6 ###
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

List all Installed Repository

Use following command to list all installed yum repositories in your system.

yum repolist

Sample Output

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: pubmirrors.dal.corespace.com
 * epel: linux.mirrors.es.net
 * extras: mirrors.easynews.com
 * remi: mirrors.mediatemple.net
 * updates: mirrors.easynews.com
repo id                 repo name                                             status
base                    CentOS-6 - Base                                        6,518
epel                    Extra Packages for Enterprise Linux 6 - x86_64        11,153
extras                  CentOS-6 - Extras                                         37
pgdg91                  PostgreSQL 9.1 6 - x86_64                                279
pgdg93                  PostgreSQL 9.3 6 - x86_64                                307
puppetlabs-deps         Puppet Labs Dependencies El 6 - x86_64                    77
puppetlabs-products     Puppet Labs Products El 6 - x86_64                       475
remi                    Les RPM de remi pour Enterprise Linux 6 - x86_64       2,407
updates                 CentOS-6 - Updates                                       748
repolist: 22,001

The post How to Install EPEL and REMI Repository on CentOS/RedHat 7/6 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-epel-and-remi-repository-on-centos-and-redhat/feed/ 0
How to Add RPMForge Yum Repository in CentOS/RHEL 7/6/5 https://tecadmin.net/add-rpmforge-yum-repository-in-centos-redhat/ https://tecadmin.net/add-rpmforge-yum-repository-in-centos-redhat/#respond Fri, 02 Jan 2015 10:59:53 +0000 https://tecadmin.net/?p=6833 The RPMForge repository has been dis-continued. Please use other yum repositories. Use the below link to find useful yum repositories Top 5 Yum Repositories RPMforge is a collaboration of Dag and other packages. It provides a large number of packages for CentOS and RHEL systems. This article will help you to how to add rpmforge [...]

The post How to Add RPMForge Yum Repository in CentOS/RHEL 7/6/5 appeared first on TecAdmin.

]]>
The RPMForge repository has been dis-continued. Please use other yum repositories. Use the below link to find useful yum repositories

  • Top 5 Yum Repositories
  • RPMforge is a collaboration of Dag and other packages. It provides a large number of packages for CentOS and RHEL systems.

    This article will help you to how to add rpmforge repository on your CentOS/RHEL 7/6/5 systems. To install more yum repositories visit article top 5 yum repositories.

    The post How to Add RPMForge Yum Repository in CentOS/RHEL 7/6/5 appeared first on TecAdmin.

    ]]>
    https://tecadmin.net/add-rpmforge-yum-repository-in-centos-redhat/feed/ 0
    Top 5 Yum Repositories for CentOS/RHEL 7/6/5 https://tecadmin.net/top-5-yum-repositories-for-centos-rhel-systems/ https://tecadmin.net/top-5-yum-repositories-for-centos-rhel-systems/#comments Thu, 01 Jan 2015 03:18:43 +0000 https://tecadmin.net/?p=720 YUM ( Yellowdog Updater, Modified ) is a command-line package management utility for RPM-based Linux systems, It has been released under the GNU General Public License. Yum is useful for RPMs which have dependencies, Yum searches for all dependencies of any RPM in all available repositories. Below list contains top 5 yum repositories (RPMFusin, EPEL, [...]

    The post Top 5 Yum Repositories for CentOS/RHEL 7/6/5 appeared first on TecAdmin.

    ]]>
    YUM ( Yellowdog Updater, Modified ) is a command-line package management utility for RPM-based Linux systems, It has been released under the GNU General Public License. Yum is useful for RPMs which have dependencies, Yum searches for all dependencies of any RPM in all available repositories.

    Below list contains top 5 yum repositories (RPMFusin, EPEL, REMI, ELRepo, Webtatic) for RHEL based systems with installation links, which we need to keep our system up to date with latest packages. These repositories having most of the RPMs required for servers.

    #1. Adding RPMFusin Repository

    The RPM Fusion repository provides the packages that are not shipped with the Fedora or Red Hat. You can add RPMFusion yum repository by executing following commands based on your system OS version.

    ### For CentOS/RHEL 7 ###
    sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm 
    sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
    
    ### For CentOS/RHEL 6 ###
    sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm
    sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm
    
    ### For Fedora 28/27/26/25/24 ###
    sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
    sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
    

    #2. Adding EPEL Repository

    Extra Packages for Enterprise Linux (EPEL) is a group that maintains the latest packages to their repository. It also contains the extra packages required for Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL) or Oracle Linux (OL).

    Use following commands to install EPEL yum repository on your CentOS/RHEL 7/6/5 systems.

    ### For CentOS/RHEL 7 ###
    sudo yum localinstall --nogpgcheck http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
    
    ### For CentOS/RHEL 6 ###
    sudo yum localinstall --nogpgcheck  http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    
    

    #3. Adding REMI Repository

    REMI is also a useful yum repository contains updated packages for Enterprise Linux systems. Use the following commands to install REMI yum repository on your CentOS/RHEL 7/6 and Fedora 28/27/26/25/24 systems.

    ### For CentOS/RHEL 7 ###
    sudo yum localinstall --nogpgcheck http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
    
    ### For CentOS/RHEL 6 ###
    sudo yum localinstall --nogpgcheck http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    
    ### Fedora 28/27/26/25/24 ###
    sudo dnf install http://rpms.famillecollet.com/fedora/remi-release-$(rpm -E %fedora).rpm
    
    

    #4. Adding ELRepo Repository

    ELRepo is an RPM repository for Enterprise Linux packages. It supports Red Hat Enterprise Linux (RHEL) and its derivatives like CentOS, Scientific Linux etc. This Project focuses on hardware related packages to enhance your experience with Enterprise Linux. This includes filesystem drivers, graphics drivers, network drivers, sound drivers, webcam and video drivers.

    
    ### For CentOS/RHEL 7 ###
    sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
    
    ### For CentOS/RHEL 6 ###
    sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    sudo rpm -Uvh  http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
    

    #5. Adding Webtatic Repository

    Webtatic is a yum repository generally deals with the web hosting related packages, which is not included with CentOS/RHEL repositories. Execute one of the following commands to install REMI yum repository on your CentOS/RHEL 7/6/5 systems.

    ### For CentOS/RHEL 7 ###
    sudo yum localinstall --nogpgcheck http://repo.webtatic.com/yum/el7/webtatic-release.rpm
    
    ### For CentOS/RHEL 6 ###
    sudo yum localinstall --nogpgcheck http://repo.webtatic.com/yum/el6/latest.rpm
    
    ### For CentOS/RHEL 5 ###
    sudo yum localinstall --nogpgcheck http://repo.webtatic.com/yum/el5/latest.rpm
    
    

    Thanks for reading this article. Read next article to setup your CentOS/RHEL system to keep packages up to date.

    The post Top 5 Yum Repositories for CentOS/RHEL 7/6/5 appeared first on TecAdmin.

    ]]>
    https://tecadmin.net/top-5-yum-repositories-for-centos-rhel-systems/feed/ 16