How to install build-essential on mac?

大兔子大兔子 提交于 2020-01-31 22:22:21

问题


build-essential installs fine on Debian/Ubuntu,

$ apt search build-essential
build-essential - Informational list of build-essential packages

$ sudo apt install build-essential

But does not appear to be available on brew/mac :

brew install build-essential
Error: No available formula with the name "build-essential" 
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...

How do I install build-essential on Mac?


回答1:


Homebrew (brew) is not the same as apt-get, and does not have the same packages. In particular, build-essential is not a Homebrew package. The package build-essential is a Debian package. From apt show build-essential,

If you do not plan to build Debian packages, you don't need this package. Starting with dpkg (>= 1.14.18) this package is required for building Debian packages.

This package contains an informational list of packages which are considered essential for building Debian packages. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed.

You can install compilers and supporting utilities with Xcode. First, download Xcode from the Mac App Store, and then run this in the terminal to install Xcode's command-line tools:

$ xcode-select --install

(Although, if you already have Homebrew installed, you probably have Xcode and its command-line tools.)



来源:https://stackoverflow.com/questions/38086451/how-to-install-build-essential-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!