Linux apt-get command not found - How to install a package in Arch Linux?
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:
- Install pacaur
$ pacman -S pacaur
- Install apt, from pacaur (no root)
$ pacaur -S apt
- Add some repositories
- 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.
Comments
-
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?
-
Deanie about 7 yearsstackoverflow.com/questions/43124985/… This should help you.
-
-
Run over 8 yearsthanks for the answer and the links! they are very useful :-)
-
Marcus over 7 yearsI 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 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 over 4 yearsIt 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 almost 4 yearsis 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.