2022年5月22日 星期日

Homebrew and install lib in Mac M1

【Install Homebrew】
  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/$USER/.zprofile
  • eval $(/opt/homebrew/bin/brew shellenv)
In xcode, add /opt/homebrew/Cellar to lib and include path

brew uninstall $lib_name
brew install $lib_name $version
brew deps $package_name
brew info $package_name
brew search $package_name@

Error: No previously deleted formula found.
Solution:
  • cd /opt/Homebrew/Library/Taps/homebrew/
  • rm -rf homebrew-core

【Install lib】
hs@hsdeMac-mini ~ % brew install openssl

==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2022-04-26

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:c05a44feba2a630de2e1cefba90d3aa3f74e4d57146c0117858f648c419abeae

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c05a44feba2a630de2e1cefba90d3aa3f74e4d57146c0117858f648c419abeae?se=2022-05-20T08%3A55%3A

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.0.3

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:6a4508b120c14a1ca4e6c804db30f2da5100df94a3198e768d124dd7afd9e707

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:6a4508b120c14a1ca4e6c804db30f2da5100df94a3198e768d124dd7afd9e707?se=2022-05-20T08%3A55%3A

######################################################################## 100.0%

==> Installing dependencies for openssl@3: ca-certificates

==> Installing openssl@3 dependency: ca-certificates

==> Pouring ca-certificates--2022-04-26.all.bottle.tar.gz

==> Regenerating CA certificate bundle from keychain, this may take a while...

🍺 /opt/homebrew/Cellar/ca-certificates/2022-04-26: 3 files, 215.6KB

==> Installing openssl@3

==> Pouring openssl@3--3.0.3.arm64_monterey.bottle.tar.gz

==> Caveats

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

/opt/homebrew/etc/openssl@3/certs




and run

/opt/homebrew/opt/openssl@3/bin/c_rehash




openssl@3 is keg-only, which means it was not symlinked into /opt/homebrew,

because macOS provides LibreSSL.




If you need to have openssl@3 first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"' >> ~/.zshrc




For compilers to find openssl@3 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"

export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"




==> Summary

🍺 /opt/homebrew/Cellar/openssl@3/3.0.3: 6,441 files, 27.9MB

==> Running `brew cleanup openssl@3`...

Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.

Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

==> Caveats

==> openssl@3

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

/opt/homebrew/etc/openssl@3/certs




and run

/opt/homebrew/opt/openssl@3/bin/c_rehash




openssl@3 is keg-only, which means it was not symlinked into /opt/homebrew,

because macOS provides LibreSSL.




If you need to have openssl@3 first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"' >> ~/.zshrc




For compilers to find openssl@3 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"

export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"openssl




【Install soup]
==> Installing dependencies for libsoup: python@3.9, gmp, bdw-gc, m4, libtool, libunistring, pkg-config, guile, libidn2, libtasn1, nettle, p11-kit, libevent, libnghttp2, unbound, gnutls, gsettings-desktop-schemas, glib-networking, icu4c and libpsl
==> Installing libsoup dependency: python@3.9
==> Pouring python@3.9--3.9.13.arm64_monterey.bottle.tar.gz
==> /opt/homebrew/Cellar/python@3.9/3.9.13/bin/python3 -m ensurepip
==> /opt/homebrew/Cellar/python@3.9/3.9.13/bin/python3 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/opt/homebrew/lib/python3.9/site-packages /opt/hom
🍺  /opt/homebrew/Cellar/python@3.9/3.9.13: 3,088 files, 57.6MB
==> Installing libsoup dependency: gmp
==> Pouring gmp--6.2.1_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gmp/6.2.1_1: 21 files, 3.2MB
==> Installing libsoup dependency: bdw-gc
==> Pouring bdw-gc--8.0.6.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/bdw-gc/8.0.6: 69 files, 1.7MB
==> Installing libsoup dependency: m4
==> Pouring m4--1.4.19.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/m4/1.4.19: 13 files, 742.4KB
==> Installing libsoup dependency: libtool
==> Pouring libtool--2.4.7.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libtool/2.4.7: 75 files, 3.8MB
==> Installing libsoup dependency: libunistring
==> Pouring libunistring--1.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libunistring/1.0: 56 files, 5.0MB
==> Installing libsoup dependency: pkg-config
==> Pouring pkg-config--0.29.2_3.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pkg-config/0.29.2_3: 11 files, 676.4KB
==> Installing libsoup dependency: guile
==> Pouring guile--3.0.8.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/guile/3.0.8: 846 files, 62.6MB
==> Installing libsoup dependency: libidn2
==> Pouring libidn2--2.3.2.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libidn2/2.3.2: 77 files, 885.4KB
==> Installing libsoup dependency: libtasn1
==> Pouring libtasn1--4.18.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libtasn1/4.18.0: 61 files, 662.7KB
==> Installing libsoup dependency: nettle
==> Pouring nettle--3.7.3.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/nettle/3.7.3: 89 files, 2.8MB
==> Installing libsoup dependency: p11-kit
==> Pouring p11-kit--0.24.1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/p11-kit/0.24.1: 67 files, 3.9MB
==> Installing libsoup dependency: libevent
==> Pouring libevent--2.1.12.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libevent/2.1.12: 57 files, 2.1MB
==> Installing libsoup dependency: libnghttp2
==> Pouring libnghttp2--1.47.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libnghttp2/1.47.0: 13 files, 694.9KB
==> Installing libsoup dependency: unbound
==> Pouring unbound--1.15.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/unbound/1.15.0: 58 files, 5.8MB
==> Installing libsoup dependency: gnutls
==> Pouring gnutls--3.7.4.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gnutls/3.7.4: 1,284 files, 11MB
==> Installing libsoup dependency: gsettings-desktop-schemas
==> Pouring gsettings-desktop-schemas--42.0.arm64_monterey.bottle.tar.gz
==> /opt/homebrew/opt/glib/bin/glib-compile-schemas /opt/homebrew/share/glib-2.0/schemas
🍺  /opt/homebrew/Cellar/gsettings-desktop-schemas/42.0: 98 files, 4.7MB
==> Installing libsoup dependency: glib-networking
==> Pouring glib-networking--2.72.0.arm64_monterey.bottle.tar.gz
==> /opt/homebrew/opt/glib/bin/gio-querymodules /opt/homebrew/lib/gio/modules
🍺  /opt/homebrew/Cellar/glib-networking/2.72.0: 76 files, 740.2KB
==> Installing libsoup dependency: icu4c
==> Pouring icu4c--70.1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/icu4c/70.1: 261 files, 74.9MB
==> Installing libsoup dependency: libpsl
==> Pouring libpsl--0.21.1_4.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libpsl/0.21.1_4: 10 files, 120.6KB
==> Installing libsoup
==> Pouring libsoup--3.0.6.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libsoup/3.0.6: 122 files, 2MB

沒有留言:

張貼留言