The apt-get command is specific to some varieties of Linux e.g. Ubuntu it is not a command included in OS X which is based on FreeBSD.
Mac OS X doesn't have apt-get. There is a package manager called Homebrew that is used instead. This command would be: brew install python. Use Homebrew to install packages that you would otherwise use apt-get for. The page I linked to has an up-to-date way of installing homebrew, but at present, you can install Homebrew as follows.
There are similar offerings to apt-get for OS X but all of them have to be installed before you can then use them to install packages.
- There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time. $ sudo dnf install asciidoc xmlto docbook2X $ sudo apt-get install asciidoc xmlto docbook2x.
- Sudo apt-get update sudo apt-get install gnome-tweak-tool After completing installation log out of the device and then login as GNOME-shell session. There is one part you will be missing in GNOME-shell is global menus, and that is why our second option is Unity Unity is.
Brew - http://brew.sh
MacPorts - http://www.macports.org
Fink - http://www.finkproject.org/
You can also of course do it by hand by installing GIT on a Mac along with the Mac Command Line tools and then GIT cloning the source for a package and compiling it just like it is sometimes necessary with Linux.
GIT - http://git-scm.com/download/mac
Command Line Tools - http://railsapps.github.io/xcode-command-line-tools.html
Jul 21, 2015 2:51 AM
Alpine
On Alpine Linux (3.6+), you can install Yarn with apk.
Currently, there are no Alpine packages available for RC or nightly builds of Yarn. Please use the tarball:
Installation Script
One of the easiest ways to install Yarn on macOS and generic Unix environmentsis via our shell script. You can install Yarn by running the following code inyour terminal:
The installation process includes verifying a GPG signature.View the source on GitHub
You can also specify a version by running the following code in your terminal:
See the releases for possible versions.
Manual Install via tarball
You can install Yarn by downloading a tarball andextracting it anywhere.
Before extracting Yarn, it is recommended that you verify the tarball using GPG:
Path Setup
If Yarn is not found in your PATH, follow these steps to add it and allow it to be run from anywhere.
Note: your profile may be in your .profile
, .bash_profile
, .bashrc
, .zshrc
, etc.
- Add this to your profile:
export PATH='$PATH:/opt/yarn-[version]/bin'
(the path may vary depending on where you extracted Yarn to) - In the terminal, log in and log out for the changes to take effect
Sudo Apt Get For Macbook
To have access to Yarn’s executables globally, you will need to set up the PATH
environment variable in your terminal. To do this, add export PATH='$PATH:`yarn global bin`'
to your profile, or if you use Fish shell, simply run the command set -U fish_user_paths (yarn global bin) $fish_user_paths