问题描述
build-essential
在 Debian/Ubuntu 上安装良好,
build-essential
installs fine on Debian/Ubuntu,
$ apt search build-essential
build-essential - Informational list of build-essential packages
$ sudo apt install build-essential
但在 brew/mac 上似乎不可用:
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...
如何在 Mac 上安装 build-essential
?
How do I install build-essential
on Mac?
推荐答案
Homebrew(brew
)和apt-get
不一样,也不一样包.特别是,build-essential
不是 Homebrew 包.软件包 build-essential
是一个 Debian 软件包.来自 apt show build-essential
,
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
,
如果您不打算构建 Debian 软件包,则不需要这个包裹.从 dpkg
(>= 1.14.18) 开始,此包是必需的用于构建 Debian 软件包.
这个包包含一个包的信息列表,这些包是被认为是构建 Debian 软件包的必要条件.这个包还取决于该列表中的软件包,以便轻松拥有已安装 build-essential 软件包.
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 的命令行工具:
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
(不过,如果您已经安装了 Homebrew,那么您可能已经安装了 Xcode 及其命令行工具.)
(Although, if you already have Homebrew installed, you probably have Xcode and its command-line tools.)
这篇关于如何在 mac 上安装 build-essential?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!