0
0

More than 1 year has passed since last update.

Linux の Homebrew を試した

Last updated at Posted at 2019-02-26

こんにちは
Homebrew for Linux が公式サポートされ 、実際にインストールして試してみました1。最新バージョン(例えば GitHub の latest バージョン)をほぼ常に使いたい場合には解となりそうです。

$ brew --version
Homebrew 2.0.2
Linuxbrew/homebrew-core (git revision 26046; last commit 2019-02-26)
$ brew install gcc binutils
$ g++ --version
  g++ (Homebrew gcc 5.5.0_4) 5.5.0
$ ld --version
GNU ld (GNU Binutils) 2.32
$ which gcc
/home/linuxbrew/.linuxbrew/bin/gcc
$ which ld
/home/linuxbrew/.linuxbrew/bin/ld

標準的なコンパイル方法例は、

$ g++ -std=c++11 -I/usr/include -I$HOMEBREW_PREFIX/include -L$HOMEBREW_PREFIX/lib test.cpp

なお MacOSX (の Homebrew)の場合では、Xcode でインストールした clang++ を使い、/bin/ls を使うところが、比較すると異なっている気がしました。

  1. brewがlinuxで使えるらしいのでやってみる」などで紹介されています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0