Celeb Glow
general | March 01, 2026

sudo: apt-get: command not found

I am trying to run the following command to install some libraries.

sudo apt-get install graphviz libgraphviz-dev pkg-config

It is however returning the following error.

sudo: apt-get: command not found

I lack the knowledge to know what is required to install to make this work.

Edit: I was using Mac. apt-get is not available to Mac.

3 Answers

Apt is not available for MacOS. There are other options such as Homebrew or Macports.

This question has been asked and answered on our Unix sister site:

It depends what version of linux you're using. Debian based distros use sudo apt-get <package_name> while Fedora based distros use yum install <package_name>.

To find out what version you're using execute command cat /etc/*-release as stated here: HowTo: Find Out My Linux Distribution Name and Version

2

If you are using Linux Ubuntu Debian, then use yum instead of apt-get. Change:

sudo apt-get install graphviz libgraphviz-dev pkg-config

to

sudo yum install graphviz libgraphviz-dev pkg-config

That should work.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy