Homebrew を使って Macbook に Wget をインストール

OS:Mac OS Catalina バージョン 10.15.4

「brew update」でリスト更新

まずはターミナル上で「brew update」を実行し、Homebrew 自体とインストール可能なソフトウェアのリストを更新します。

~ % brew update
Updated 1 tap (homebrew/core).
==> Updated Formulae
acpica              imagemagick         nss                 solr
atlantis            imagemagick@6       onnxruntime         solr@7.7
efl                 kyma-cli            operator-sdk        stellar-core
evince              lazydocker          pandoc-crossref     terragrunt
exploitdb           lerna               picard-tools        vault
fcct                librsvg             plantuml            vim
firebase-cli        mavsdk              pnpm                vte3
gatsby-cli          mu                  prestosql           watson
helmfile            ncdu                re-flex
hlint               node-sass           redis
~ % 

「brew install wget」で Wget をインストール

ターミナル上で「brew install wget」を実行すると、Wget のインストール処理が始まります。

~ % brew install wget
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.20.2_1.catalina.b
==> Downloading from https://akamai.bintray.com/71/71f4ded03e8258b5e6896eebb00d2
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/libunistring-0.9.10.catalin
==> Downloading from https://akamai.bintray.com/ce/ce746662b98d93511b86920011b5c
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/libidn2-2.3.0.catalina.bott
==> Downloading from https://akamai.bintray.com/09/0908585cca518a83f101b2edc0417
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/openssl%401.1-1.1.1g.catali
==> Downloading from https://akamai.bintray.com/19/1926679569c6af5337de812d86f4d
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/wget-1.20.3_2.catalina.bott
==> Downloading from https://akamai.bintray.com/ef/ef65c759c5097a36323fa9c777564
######################################################################## 100.0%
==> Installing dependencies for wget: gettext, libunistring, libidn2 and openssl@1.1
==> Installing wget dependency: gettext
==> Pouring gettext-0.20.2_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/gettext/0.20.2_1: 1,923 files, 18.6MB
==> Installing wget dependency: libunistring
==> Pouring libunistring-0.9.10.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libunistring/0.9.10: 54 files, 4.4MB
==> Installing wget dependency: libidn2
==> Pouring libidn2-2.3.0.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libidn2/2.3.0: 70 files, 727.8KB
==> Installing wget dependency: openssl@1.1
==> Pouring openssl@1.1-1.1.1g.catalina.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have openssl@1.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

==> Summary
🍺  /usr/local/Cellar/openssl@1.1/1.1.1g: 8,059 files, 18MB
==> Installing wget
==> Pouring wget-1.20.3_2.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/wget/1.20.3_2: 50 files, 4.0MB
==> Caveats
==> openssl@1.1
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have openssl@1.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

~ % 

入力待ち状態になったら完了です。途中ビールのアイコンが表出されるのかわいいですね。

「wget --version」で確認

インストールが完了した後、ターミナルで「wget --version」を実行すると、Wget のバージョン情報や著作権に関する案内、バグ報告の質問の連絡先が表出されます。

~ % wget --version
GNU Wget 1.20.3 built on darwin19.0.0.

-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls 
+ntlm +opie -psl +ssl/openssl 

Wgetrc: 
    /usr/local/etc/wgetrc (system)
ロケール: 
    /usr/local/Cellar/wget/1.20.3_2/share/locale 
コンパイル: 
    clang -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" 
    -DLOCALEDIR="/usr/local/Cellar/wget/1.20.3_2/share/locale" -I. 
    -I../lib -I../lib -I/usr/local/opt/openssl@1.1/include -DNDEBUG -g 
    -O2 
リンク: 
    clang -DNDEBUG -g -O2 -lidn2 -L/usr/local/opt/openssl@1.1/lib -lssl 
    -lcrypto -ldl -lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a 
    -liconv -lintl -Wl,-framework -Wl,CoreFoundation -lunistring 

Copyright (C) 2015 Free Software Foundation, Inc.
ライセンス GPLv3+: GNU GPL バージョン 3 あるいはそれ以降のバージョン
<http://www.gnu.org/licenses/gpl.html>.
このソフトウェアはフリーソフトウェアです。自由に変更、再配布ができます。
法律が許すかぎり、全くの無保証です。

Hrvoje Niksic <hniksic@xemacs.org> によって書かれました。
バグ報告や質問は<bug-wget@gnu.org>へ
~ %