build-essential
在 Debian/Ubuntu 上安装良好,
$ apt search build-essential
build-essential - Informational list of build-essential packages
$ sudo apt install build-essential
但在 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...
如何在 Mac 上安装 build-essential
?
最佳答案
Homebrew (brew
) 与 apt-get
不同,并且没有相同的包。特别是,build-essential
不是 Homebrew 包。包build-essential
is a Debian package .来自 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.
您可以使用 Xcode 安装编译器和支持实用程序。首先,从 Mac App Store 下载 Xcode,然后在终端运行这个来安装 Xcode 的命令行工具:
$ xcode-select --install
(不过,如果您已经安装了 Homebrew,那么您可能已经安装了 Xcode 及其命令行工具。)
关于macos - 如何在 mac 上安装 build-essential?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38086451/