Mac OS X Can't install build-essential via brew or apt-get

14,929

What on Earth are you doing? macOS doesn't use apt-get - at all. It doesn't come with a package manager.

There are independent package management tools, to my mind the best of them is homebrew from here. Some folks use MacPorts.

Before you can do any development in macOS, you need Xcode's command-line tools - see here.

If you want Postgresql, I suggest you go to the homebrew website above, copy the one-line install and paste it into Terminal. Once you have that set up, you can install Postgresql with:

brew install postgresql

If you want to search for package abcXYZnnn, just search for any part of that name:

brew search XYZ

If you want to do updates, and upgrades:

brew update && brew upgrade

If you want to remove a package:

brew rm PACKAGENAME
Share:
14,929
Jamie
Author by

Jamie

A newbie learning to code

Updated on June 05, 2022

Comments

  • Jamie
    Jamie almost 2 years

    So I've been trying for two days to unsuccessfully install build-essential on a Mac OS X Sierra with brew and apt-get. Researching into the issue has given me some results but nothing that has yielded any results.

    sudo apt-get update
    Reading Package Lists... Done
    Building Dependency Tree... Done
    

    Being lazy I've also listed below the other packages I'm struggling to install and their respective errors below.

    sudo apt-get install -y build-essential
    
    E: Couldn't find package build-essential
    E: Couldn't find package libfreetype6-dev
    E: Couldn't find package automake
    E: Couldn't find package postgresql-9.5
    

    Theres been a couple of suggestions to edit the source list of apt-get but I can't seem to find it.

  • bfontaine
    bfontaine almost 7 years
    You can get apt-get on macOS : thecustomizewindows.com/2013/11/…