-bash: apt-get: command not found

20,414

Solution 1

The tool apt-get is not a part of the Apple OSX family of products, and as such should not be expected to be found on a typical installation. One can, however, install apt, as a front-end for dpkg, using MacPorts. How useful, or advisable this would actually be is left as an exercise to the reader. To install said packages, one should perform the following command sequence.

/opt/local/bin/port selfupdate
/opt/local/bin/port install dpkg
/opt/local/bin/port install apt

After this, you're on your own....

Solution 2

I don't like macports.. I prefer homebrew

Link

Share:
20,414

Related videos on Youtube

wesbos
Author by

wesbos

Author of Sublime Text Book HTML5, JavaScript, Sublime Text, Node.js, CSS3 and all good things.

Updated on September 18, 2022

Comments

  • wesbos
    wesbos almost 2 years

    Over the course of uninstalling the HP/palm enyo SDK and installing node JS I somehow goofed up something (I think my path).

    Now when I try use apt-get I get the following:

    -bash: apt-get: command not found
    

    I'm not really sure how to fix this. Here is my $PATH

    /opt/local/bin:/opt/local/sbin:/Users/wesbos/local/node/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/PalmSDK/0.1/bin/
    

    Using OSX Lion but problem was persistent with Snow Leopard

    • Wesley
      Wesley almost 13 years
      Did you use MacPorts or Fink to get apt-get on your Lion box? Fink doesn't support Lion yet.
    • Wesley
      Wesley almost 13 years
      Perhaps we should back up a bit. How did you get apt on your Mac in the first place since it's not shipped with OS X?
    • wesbos
      wesbos almost 13 years
      :| I'm not sure. Does it come with xcode? I've always just had it..