如何在mac上安装build-essential?

时间:2016-06-28 21:16:55

标签: macos build debian homebrew

starting_position = XXX # replace XXX with the starting position of your # desired string read_length = YYY # replace YYY with how many characters you want to read with open("filename.txt") as f: f.seek(starting_position) st = f.read(read_length) # st now has your characters 在Debian / Ubuntu上安装正常,

build-essential

但似乎没有在brew / mac上提供:

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

$ sudo apt install build-essential

如何在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...

1 个答案:

答案 0 :(得分:20)

自制软件(brew)与apt-get不同,并且没有相同的软件包。特别是,build-essential不是Homebrew包。包build-essential is a Debian package。来自apt show build-essential

  

如果您不打算构建Debian软件包,则不需要这样做    包。从dpkg(> = 1.14.18)开始,此包是必需的    用于构建 Debian软件包。

     

此软件包包含一个信息包列表    被认为是构建 Debian 包所必需的。这个包还    取决于该列表上的包,以便轻松拥有    已安装build-essential软件包。

您可以使用Xcode安装编译器和支持实用程序。首先,从Mac App Store下载Xcode,然后在终端中运行以安装Xcode的命令行工具:

$ xcode-select --install

(虽然,如果你已经安装了Homebrew,你可能拥有Xcode及其命令行工具。)