4 minute read

Tensorflow GPU Setup on Local Machine

What is Package Manager?

Package managers help simplify the process of software installation, updating, and dependency management on their respective platforms.

System Package Managers:

These manage software at the operating system level, handling installation, updates, and dependency management for system-wide applications.

  1. APT (Advanced Package Tool) - Debian/Ubuntu-based systems.
  2. YUM (Yellowdog Updater, Modified) - Older Red Hat-based systems.
  3. DNF (Dandified YUM) - Newer Red Hat-based systems (Fedora, CentOS 8).
  4. Pacman - Arch Linux and derivatives.
  5. Zypper - openSUSE.
  6. RPM - Red Hat Package Manager, used in many RPM-based systems.
  7. Snap - Canonical’s package manager for Ubuntu and other Linux distros.
  8. Flatpak - Another universal package manager that works across different Linux distributions.
  9. Nix: A powerful package manager for Linux and macOS that allows reproducible builds.
  10. Homebrew - macOS and Linux.
  11. MacPorts - macOS.
  12. Chocolatey - Windows.
  13. Scoop - Windows.
  14. winget - Windows Package Manager.

Project-Specific Dependency Managers:

These manage dependencies and packages for specific programming languages and development environments.

  1. pip - Python.
  2. Conda - Python and other languages, supports virtual environments, also manages binaries.
  3. Maven - Java projects (dependency and build management).
  4. Gradle - Java and Android projects (build automation).
  5. npm (Node Package Manager) - JavaScript/Node.js.
  6. Yarn - JavaScript/Node.js (alternative to npm).
  7. Composer - PHP.
  8. RubyGems - Ruby.
  9. Bundler - Ruby (dependency management).
  10. Cargo - Rust.
  11. NuGet - .NET.
  12. Go Modules - Go programming language.
  13. CocoaPods - Swift and Objective-C (iOS development).
  14. Pub - Dart (including Flutter projects).
  15. Conda - Python and other languages, data science environments.
  16. Poetry - Python (dependency management and packaging).
  17. Mix - Elixir projects.

These tools help manage dependencies and environments tailored to specific languages or frameworks, ensuring projects have the correct versions of libraries and tools they depend on.

Docker also help in package management, so in what category you put Docker?

Docker helps in installing and running software packages by using containers. It doesn’t directly install packages like traditional package managers, but instead, it provides a complete environment (a container) where the necessary software is already set up, including all dependencies.

How to install software in Linux/wsl?

In Linux, to install a program, you typically use a package manager, which automates the process of downloading, installing, and managing software packages. The specific commands can vary depending on the distribution:

  1. Debian/Ubuntu-based distributions: Use the apt package manager. For example, to install a package, you might run:
    sudo apt update
    sudo apt install package-name
    
  2. Red Hat/CentOS-based distributions: Use the yum or dnf package manager. For example:
    sudo yum install package-name
    
  3. Arch-based distributions: Use the pacman package manager. For example:
    sudo pacman -S package-name
    

These package managers handle downloading the correct versions of the software and any dependencies. Some applications may also provide .rpm or .deb files (similar to .exe files in Windows), which you can install directly using commands like dpkg for Debian-based systems or rpm for Red Hat-based systems.

How to install softare in Linux using dpkg or rpm?

dpkg is the package manager used in Debian-based distributions like Debian, Ubuntu, and their derivatives. It works with .deb files, which are software packages specifically designed for these distributions. It allows users to install, remove, and provide information about .deb packages. It also manages package dependencies, though it does not automatically download dependencies (this is handled by higher-level tools like apt).

rpm is another package management system used by Red Hat-based distributions, such as Red Hat Enterprise Linux (RHEL), CentOS, and Fedora. It handles .rpm files, which are software packages specifically designed for these distributions. Similar to dpkg, it allows for the installation, removal, and querying of .rpm packages. RPM itself does not handle dependency resolution automatically; tools like yum and dnf are used for that purpose.

Here are examples of how to use .rpm and .deb files to install software directly in Linux systems:

For .deb files (Debian/Ubuntu-based systems):

  1. Example Software: Suppose you have a .deb file named example-package.deb.
  2. Installation Command:
    sudo dpkg -i example-package.deb
    

    This command uses dpkg to install the .deb file.

  3. Handling Dependencies: If there are missing dependencies, you can use:
    sudo apt-get install -f
    

    This will automatically resolve and install the required dependencies.

For .rpm files (Red Hat/CentOS-based systems):

  1. Example Software: Suppose you have an .rpm file named example-package.rpm.
  2. Installation Command:
    sudo rpm -ivh example-package.rpm
    

    This command uses rpm to install the .rpm file with options -i for install, -v for verbose, and -h for hash marks showing the progress.

  3. Handling Dependencies: If there are dependency issues, you can use:
    sudo yum localinstall example-package.rpm
    

    or for dnf (the newer version of yum):

    sudo dnf install example-package.rpm
    

    These commands will automatically manage and install dependencies.

Using .deb and .rpm files allows you to install software directly, much like using .exe files in Windows, but you often need to handle dependencies to ensure everything works correctly.

Updated:

Leave a comment