Search code examples
fedoraapt

sudo apt can't install packages


I recently switched to Fedora.

sudo apt install doesn't work, as any package I try cannot be found.

I tried the following:

node, nodejs, build-essentials, python, python2, python3

all of which gave me: Unable to locate package [package name]

How can I install packages?


Solution

  • APT is a package manager for Debian-based systems, and Fedora is Red-Hat-based.

    All Red-Hat-based systems use the RPM-based package manager. Thus you should be able to install packages using either yum (for all Red-Hat systems) or dnf (for Fedora only).

    Try using the below command to install packages

    sudo yum install <package-name>
    

    or

    sudo dnf install <package-name>