MAC High Sierra で wgetをインストールする方法

MAC High Sierra で wgetをインストールしようとしたら以外と手間取ったのでメモ。
homebrewでエラー
[MacBook-Pro:]$ brew install wget Error: /usr/local is not writable. You should change the ownership and permissions of /usr/local back to your user account: sudo chown -R $(whoami) /usr/local Error: Permission denied @ dir_s_mkdir - /usr/local/var
へいへい。メッセージ通り以下を実行
sudo chown -R $(whoami) /usr/local
さらなるエラー・・・
ここでのエラーは以下が原因
[blogcard url=”https://alphacast.jp/mac/mac-high-sierra-%e3%81%8b%e3%82%89-usr-local-%e3%82%92%e6%a8%a9%e9%99%90%e5%a4%89%e6%9b%b4%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%8f%e3%81%aa%e3%81%a3%e3%81%9f/”]
結局、以下を実行しhomebrewを再構築すると解決した。
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
参照:https://stackoverflow.com/questions/33886917/how-to-install-wget-in-macos-capitan-sierra
気を取り直し再度インストール実行
Homebrew 1.5.1
Homebrew/homebrew-core (git revision 96c5; last commit 2018-01-22)
[Kens-MacBook-Pro:kenichirou:~]$ brew install wget
==> Installing dependencies for wget: gettext, libunistring, libidn2, openssl@1.1
==> Installing wget dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gettext-0.19.8.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
==> Summary
🍺 /usr/local/Cellar/gettext/0.19.8.1: 1,935 files, 16.9MB
==> Installing wget dependency: libunistring
==> Downloading https://homebrew.bintray.com/bottles/libunistring-0.9.8.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libunistring-0.9.8.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/libunistring/0.9.8: 53 files, 4.4MB
==> Installing wget dependency: libidn2
==> Downloading https://homebrew.bintray.com/bottles/libidn2-2.0.4.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libidn2-2.0.4.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/libidn2/2.0.4: 46 files, 580.6KB
==> Installing wget dependency: openssl@1.1
==> Downloading https://homebrew.bintray.com/bottles/openssl@1.1-1.1.0g_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl@1.1-1.1.0g_1.high_sierra.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
This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl@1.1/lib
CPPFLAGS: -I/usr/local/opt/openssl@1.1/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl@1.1/lib/pkgconfig
==> Summary
🍺 /usr/local/Cellar/openssl@1.1/1.1.0g_1: 6,585 files, 15.6MB
==> Installing wget
==> Downloading https://homebrew.bintray.com/bottles/wget-1.19.4.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring wget-1.19.4.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/wget/1.19.4: 50 files, 3.7MB
無事インストール完了!
コメント
この記事へのトラックバックはありません。











この記事へのコメントはありません。