Users who use Ubuntu or Debian on a daily basis have been quite familiar with apt-get
– a command that uses APT to quickly install and manage software packages. When switching to macOS devices, chances are, you are going to miss apt-get
. Users who try to run apt-get command in macOS will definitely encounter "apt-get command not found" error message.
If you’re feeling that you absolutely need apt-get
, this article will list a few ways you can do so.
Use brew instead of apt-get
Homebrew is a popular package manager designed specifically for Mac OS. It simplifies the process of installing and removing programs. In order to install Homebrew, just open a Terminal window and paste the following command.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once Homebrew is installed, you can easily install any piece of software with the command brew install the_name
where the the_name
is the package name. There is literally thousands of packages in Homebrew official repository, you can find more details about each of them in this page.
In order to use Homebrew effectively, you have to know its terminology.
- Formulae: A package definition written
- Keg: Installation prefix of a formula (e.g., /usr/local/Cellar/pipenv)
- Keg-only dependency: Dependency that isn’t symlinked to places like /usr/local
- Cask: An extension of Homebrew to install MacOS native apps (e.g., Atom and Google Chrome)
- Cellar: Where kegs are installed (/usr/local/Cellar)
- Bottle: A pre-built keg (rather than one built from source)
- Tap: A git repository. To tap a repository is to make a shallow clone of it.
- Brew bundle: An extension of Homebrew to describe dependencies
And a few Homebrew basic commands.
brew install <formula name> # Installs a package
brew uninstall <formula name> # Uninstalls a package
brew list # Lists all installed packages
brew search # Lists all locally available packages
brew search <text> # Searches for package name online in homebrew/core and homebrew/cask
brew search /<text>/ # Search using regex
Use Fink
Fink is a project that aims to bring a variety of open source software on Unix to the Darwin and Mac OS X platforms. They modified Unix software so that it will run on Mac OS, and then package them into an easy to use package which everyone can download. Fink uses the existing programs on the Linux world to function its core features, such as dpkg
, dselect
and apt-get
.
In order to install Fink, you need to head over to its homepage and find detailed instruction for your specific Mac OS version.
Currently, Mac OSX 10.4 and 10.5 users can simply download a binary installer and run it. Meanwhile, users who are running version 10.6 to 10.15 have to follow the source install instructions instead. Detailed information can be found at Download Fink Source Release.
We hope that the article above provide some helpful information on apt-get
in mac OS. If you use apt-get
on a daily basis, you may want to check out our guides on its popular error messages, such as “The repository does not have a release file” and “apt-get : command not found”.
If you have any suggestions or spot an error in the article, feel free to leave a comment below to let us know.