1. Home
  2. Mac OS X

(FIXED) Apt-get Command Not Found on Mac – Full Tutorial

If you’ve ever used a Linux system, you may be familiar with the Apt-get command. It’s used to install apps or packages. macOS and Linux have some similarities and a very small number of Linux packages can be installed on macOS. Older versions of macOS are far more likely to be able to run a Linux app.

Apt-get command not found on macOS

Apt-get command not found?

The Apt-get command not found message appears when users try to install a Linux app with the command. There is nothing wrong with the Apt-get command but it isn’t going to work on macOS. macOS doesn’t have this particular package manager which is why it won’t work.

How to fix apt-get on Mac

That doesn’t mean you can’t install a Linux package on macOS. You just have to use a different tool.


If you’re familiar with Linux, you’re also familiar with Homebrew. It is available for macOS, and it can be used to install packages.

  1. Make sure you have Xcode installed (Note: get it from the Mac App Store)
  2. Open Terminal and run this command: xcode-select --install.
  3. Accept the EULA.
  4. Run this command to install Homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Confirm you want to install Homebrew.
  2. Once installed, verify it with this command: brew -v.
  3. You can now install packages with this command:
brew install Name_of_package

Note: You can install Homebrew on Windows 10 subsystem for Linux.


Macports is another package manager for macOS. It works as well as Homebrew but generally speaking, you should only pick one of the two.

  1. Make sure you have Xcode installed. Get it from the Mac App Store.
  2. Open Terminal.
  3. Run this command: xcode-select --install.
  4. Confirm that you want to install the Xcode tools.
  5. Download Macports for your version of macOS.
  6. Run the PKG file and install Macports.
  7. Install packages with this command:
port install Name_of_package


Apt-get isn’t going to work outside Linux. You will ultimately have to use a different package manager. macOS is built on BSD and BSD is what is similar to Linux. That is quite a stretch as far as technology is concerned which is why there is no way to use the Apt-get command on macOS. Homebrew and Macports are just as capable of installing packages as Apt-get. If you’re unable to install a package with Homebrew or Macports, or it doesn’t work after it has been installed, it is likely a shortcoming with the package itself or other dependencies that have to be resolved. Neither Homebrew nor Macports can get a damaged package to work on macOS.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.