Homebrew, Formulae와 Cask의 차이점

Homebrew는 macOS와 Linux에서 소프트웨어를 쉽게 설치하고 관리할 수 있는 패키지 관리자. Homebrew https://brew.sh/{:target="_blank"} Homebrew는 macOS와 Linux에서 소프트웨어 패키지를 간편하게 설치하고 관리할 수 있는 패키지 관리자 Homebrew에는 두 가지 주요 설치 방법인 Formulae와 Cask가 있습니다. Formulae와 Cask의 차이점과 동일한 애플리케이션이 두 가지 방법으로 제공되는 예시를 설명 Homebrew 설치 macOS $ brew --version # 설치 확인 Linux $ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" $ brew --version # 설치 확인 Homebrew 주요 명령어 Formulae 설치 (CLI 애플리케이션) brew install <package-name> 예: wget 설치 ...

June 7, 2024 · Byung Kyu KIM

GCC 설치 (`macOS`, `Windows`)

macOS 및 Windows 에 GCC 설치하기 MAC OS brew : macOS 용 패키지 관리자 https://brew.sh/index_ko{:target="_blank"} brew 사용 gcc 설치 Command line tools 설치 xcode 없이 개발툴 설치 $ xcode-select --install clang 이 설치되고 gcc로 심볼링 링크 걸려 있음 $ gcc -v Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.5 (clang-1205.0.22.11) Target: arm64-apple-darwin20.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin GCC (G++) 설치 # 특정 버전으로 설치 가능 $ brew search gcc ==> Formulae gcc gcc@5 gcc@8 libgccjit ghc ncc gcc@10 gcc@6 gcc@9 x86_64-elf-gcc scc gcc@4.9 gcc@7 i686-elf-gcc grc tcc ==> Casks gcc-arm-embedded # 기본(최신) 버전 설치 $ brew install gcc ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae Updated 1 formula. ==> Downloading https://ghcr.io/v2/homebrew/core/gcc/manifests/11.2.0 Already downloaded: /Users/cdecl/Library/Caches/Homebrew/downloads/210783e77b227b8210d559abfe3514cdb95c915619fa3f785ad212120d6a36f9--gcc-11.2.0.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/gcc/blobs/sha256:23ec727fa684a9f65cf9f55d61d208486d5202fb6112585a01426a Already downloaded: /Users/cdecl/Library/Caches/Homebrew/downloads/8d1fae8a356d50aa911004b768eff64c241e170ce9be66e684b819fc4f67fc7c--gcc--11.2.0.arm64_big_sur.bottle.tar.gz ==> Pouring gcc--11.2.0.arm64_big_sur.bottle.tar.gz 🍺 /opt/homebrew/Cellar/gcc/11.2.0: 1,412 files, 339.5MB 심볼릭링크 설정 및 PATH 설정 $ cd /opt/homebrew/Cellar/gcc/11.2.0 $ ls -l ... -rwxr-xr-x 1 cdecl admin 1.7M 8 28 13:41 g++-11 -rwxr-xr-x 1 cdecl admin 1.7M 8 28 13:41 gcc-11 ... $ ln -s g++-11 g++ $ ln -s gcc-11 gcc .zshrc or .bashrc export PATH=/opt/homebrew/Cellar/gcc/11.2.0/bin:$PATH $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/11.2.0/libexec/gcc/aarch64-apple-darwin20/11.1.0/lto-wrapper Target: aarch64-apple-darwin20 Configured with: ../configure --prefix=/opt/homebrew/Cellar/gcc/11.2.0 --libdir=/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-11 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 11.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --build=aarch64-apple-darwin20 --with-system-zlib --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.1.0 (Homebrew GCC 11.2.0) Windows chocolatey chocolatey : Windows 용 패키지 관리자 https://chocolatey.org/{:target="_blank"} choco 사용 gcc 설치 GCC (G++) 설치 패키지가 2개중에 하나 선택 mingw : https://community.chocolatey.org/packages/mingw{:target="_blank"} winlibs : https://community.chocolatey.org/packages/winlibs{:target="_blank"} winlibs가 버전이 높고 mingw는 버전인 올라가면서 posix thread가 문제가 있음 ...

August 27, 2021 · Byung Kyu KIM