macos - 如何在 mac 上安装 build-essential?

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 及其命令行工具。)

https://stackoverflow.com/questions/38086451/

相关文章:

javascript - grunt-concat 分隔符选项?

build - Sublime Text 2 通过简单的批处理文件构建

gradle - 如何更改使用 shadowjar 创建的 jar 的名称

linux - 使用 Jenkins 的嵌入式 Linux 开发模型

java - Eclipse Gradle 构建 "Could not find tools.jar

c++ - Visual Studio 2010 - 在不同的构建配置之间保留项目属性?

image - Docker:构建你自己的镜像问题

build - 将 Gradle 脚本从根目录导入子项目

android - 仅使用 armeabi 构建的应用程序能否在 armeabi-v7a 设备上运行

c# - 构建失败。有关详细信息,请参阅构建日志