Linux apt-get command not found - How to install a package in Arch Linux?

104,458

Solution 1

First of all, Arch provides a beautiful, well maintained wiki. You may want to read it first before working with Arch. The pre-installed package manager is "pacman".

To install a package from the official repositories, you will need to use it like this:

# pacman -S <package name>

There is also a community maintained version, the Arch User Repository, for packages not part of the official repository.

Solution 2

I used this page https://wiki.archlinux.org/index.php/Pacman_Rosetta when I moved to Arch linux, it lists the equivalent commands for various common package managers, including apt and pacman.

For example:

+-----------------------+-------------+----------------+-------------------------+----------------+-----------------+
|        Action         |    Arch     | Red Hat/Fedora |      Debian/Ubuntu      | SLES/openSUSE  |     Gentoo      |
+-----------------------+-------------+----------------+-------------------------+----------------+-----------------+
| Install a package(s)  | pacman -S   | dnf install    | apt install             | zypper install | emerge [-a]     |
| Remove a package(s)   | pacman -Rs  | dnf remove     | apt remove              | zypper remove  | emerge -C       |
| Search for package(s) | pacman -Ss  | dnf search     | apt search              | zypper search  | emerge -S       |
| Upgrade Packages      | pacman -Syu | dnf upgrade    | apt update; apt upgrade | zypper update  | emerge -u world |
| ...                                                                                                               |

Solution 3

If you really want to download apt, then:

  1. Install pacaur $ pacman -S pacaur
  2. Install apt, from pacaur (no root) $ pacaur -S apt
  3. Add some repositories
  4. Now you have working apt on arch linux

Solution 4

Arch linux does not generally use the apt package manager. It uses pacman: https://wiki.archlinux.org/index.php/Pacman

Solution 5

You can't. Arch does not use the apt package system unlike Debian-based linuxes, like Ubuntu. Instead it uses the pacman package manager. However, you should try it out. Using pacman myself, I never had a problem with it, and you can still use it in order to install packages that you can get with the apt package manager.

Share:
104,458
Run
Author by

Run

A cross-disciplinary full-stack web developer/designer.

Updated on July 05, 2022

Comments

  • Run
    Run almost 2 years

    I am trying to install a command:

    $ sudo -s apt-get install net-tools
    /bin/bash: apt-get: command not found
    

    How can I install apt-get then?

    I use command below to find Out My Linux Distribution Name and Version:

    $ cat /etc/*-release
    

    I get this below:

    NAME="Arch Linux"
    ID=arch
    PRETTY_NAME="Arch Linux"
    ANSI_COLOR="0;36"
    HOME_URL="https://www.archlinux.org/"
    SUPPORT_URL="https://bbs.archlinux.org/"
    BUG_REPORT_URL="https://bugs.archlinux.org/"
    

    Any ideas what should I do to install a command in Arch Linux?

  • Run
    Run over 8 years
    thanks for the answer and the links! they are very useful :-)
  • Marcus
    Marcus over 7 years
    I don't think "converts ... common package manager commands including apt to pacman" describes what happens. That feels like "apt update" converts to "pacman update", which it doesn't.
  • Hany Alsamman
    Hany Alsamman over 7 years
    @Marcus I don't mean what you understood, the table in the link showing each command in ubuntu and Arch , apt upgrade -> pacman -Syu
  • Patrick
    Patrick over 4 years
    It isn't true that you can't use apt on Arch. You can install apt from the AUR. I am working on maintaining both deb and rpm packages for a tool I develop, and one of the great things about Arch is that you can install both dpkg/apt and rpm/(yum|dnf). However, I definitely recommend using pacaur to manage software that you aren't just testing.
  • Tomachi
    Tomachi almost 4 years
    is there any downside to this approach? Also I see error: target not found: pacaur on the version of Arch linux that comes with RuneAudio running on Raspberry PI.