1st try!
$ brew install awscli Updating Homebrew... ==> Auto-updated Homebrew! Updated 4 taps (homebrew/core, homebrew/cask, homebrew/services and caskroom/cask). ==> New Formulae atlantis clzip docker-machine-driver-vmware heatshrink libzt pprint spice-gtk terraform@0.11 catch2 csvq drone-cli hey lizard procs spirv-tools terraformer cjson dbmate dust include-what-you-use molten-vk scala@2.12 swig@3 virgil clojure-lsp deno erlang@21 ipopt newman scdoc termshark ==> Updated Formulae cmake ✔ conserver glooctl libbitcoin-protocol neo4j qbs swiftlint git ✔ consul glslang libbitcoin-server neovim qca swimat imagemagick@6 ✔ convox gmic libdazzle netdata qd sync_gateway nginx ✔ coq gnu-units libdc1394 nifi-registry qpdf syncthing node ✔ corsixth gnumeric liberasurecode nim qrupdate synfig openssl ✔ cppad gnunet libev nlopt quantlib sysbench ruby-build ✔ cpprestsdk gnupg libevent nnn quazip talloc xpdf ✔ cql gnuplot libical node-build quicktype tass64 yarn ✔ cracklib gnuradio libidn2 node@10 quilt tbb acpica crc32c gnutls libimagequant node_exporter qwt tcsh aide cromwell go libjwt nomad rabbitmq tdlib akamai cryfs gobject-introspection libmagic notmuch radare2 telegraf akka cryptol godep libosinfo nss rancid teleport aliyun-cli crystal goffice libphonenumber ntl range-v3 terraform allure csound golang-migrate libpsl numpy raylib terragrunt ammonite-repl cucumber-cpp gollum libpulsar ocrmypdf rbspy terrahub angular-cli curl gomplate libqalculate octave rclone testssl ansible curl-openssl goofys librealsense ompl rdesktop texmath ant@1.9 cython google-authenticator-libpam libressl opa re2 tfenv anyenv dartsim google-benchmark librsvg openapi-generator rebar3 thefuck apache-archiva dav1d googler libsass opencascade recoverjpeg tika apache-drill dcd gor libsigc++ opencc redis tile38 arangodb dcm2niix goreleaser libsodium opencoarrays redo tippecanoe aravis dep gpsbabel libsoup openfortivpn remind tkdiff armadillo dependency-check grafana libswiften openimageio reposurgeon tmuxinator-completion arpack dhall grails libtorrent-rasterbar openshift-cli restview tokei artifactory dhall-json grakn libuv openssl@1.1 rhino tomcat asdf diffoscope graph-tool libvirt openvdb riemann tomcat@7 ask-cli digdag grpc lighttpd operator-sdk riff tomcat@8 aspectj dita-ot grpcurl lilv osc rke tomee-plus astrometry-net django-completion gst-plugins-good linkerd ospray rom-tools tomee-webprofile atari800 dmd gtk-gnutella llvm osquery roswell topgrade atomist-cli dnscontrol gx lmod osrm-backend rt-audio tox auditbeat dnscrypt-proxy h3 logstash owfs rtmidi traefik augeas dnstwist hana lsd p11-kit rust trafficserver autorest docfx hapi-fhir-cli lv2 packer rustup-init treefrog avra docker-machine-driver-xhyve harfbuzz lwtools paket s-search trezor-agent avro-c doctl hebcal lxc pam-u2f sassc triton avro-cpp double-conversion heimdal macvim pandoc saxon tundra avro-tools dscanner helmfile mafft pandoc-crossref sbcl typescript aws-okta dub hexyl mailutils paperkey scala u-boot-tools aws-sdk-cpp duck highlight mame parallel scalariform uhd awscli duo_unix hlint mariadb parallelstl scipy uncrustify axel dynare homebank mariadb-connector-c pari scmpuff ungit azure-cli elasticsearch hub mariadb@10.1 passenger scons upscaledb azure-storage-cpp elasticsearch@5.6 hugo mariadb@10.2 patchelf scrcpy urdfdom_headers b2-tools embree hyperfine mat2 payara sdb v8 babel emscripten hypre math-comp pcb sdcc vala babl encfs i2pd maxima pdal sdl2_ttf vault basex envconsul ibex maxwell pdfpc sec velero bat epubcheck icecream memcached pdns serd vert.x bazel erlang imagemagick mercurial perl serf vim bear etl imageoptim-cli mesa peru serverless vim@7.4 bedops exiftool inlets mesos pgbadger sfcgal vips bee exploitdb ipfs metaproxy pgcli shadowsocks-libev visp binaryen eye-d3 ispc metricbeat pgformatter shc volt bind faas-cli istioctl mgba pgrouting ship vulkan-headers bison faudio itk micronaut phoronix-test-suite shogun vultr bit ffsend ivykis micropython php shyaml wabt bitcoin file-formula jdnssec-tools mighttpd2 php-cs-fixer siril wartremover bitrise fio jdupes mill php@7.1 sk watchexec bitwarden-cli firebase-cli jena minimal-racket php@7.2 skaffold webdis boost flintrock jenkins minio phpmyadmin skopeo webpack boost-bcp flow jenkins-job-builder minio-mc phpstan sleuthkit websocat boost-build fluxctl jenkins-lts mk-configure phpunit smali websocketd boost-mpi fn jfrog-cli-go mkl-dnn physfs smimesign weechat boost-python fobis jhipster mksh picard-tools sn0int wesnoth boost-python3 folly jmxterm mkvtoolnix picat solr wget bowtie2 fontforge joplin mlt pick solr@7.7 whois braid fonttools jsonnet mmark pilosa sops widelands buildifier fq jsonschema2pojo mmseqs2 pinfo source-highlight wildfly-as buku freeradius-server juju molecule planck source-to-image wimlib byteman frugal just monero plantuml sourcery wine bzt fselect kafka monetdb plplot sparse wiredtiger caffe fuseki khal mongo-c-driver plzip sphinx-doc wireguard-go calicoctl futhark kibana mongoose pmd spin wireguard-tools cargo-completion gandi.cli kitchen-sync mono-libgdiplus pngquant spirv-cross wiremock-standalone cc65 gcsfuse knot mpck pod2man sqlcipher wireshark ccextractor gdcm kobalt mpich ponyc sqlmap wp-cli-completion ccls gecode kops mplayer postgresql@10 sratom wtf certbot genact ktlint mpop postgresql@9.4 srt wxmaxima cfengine gengetopt kubecfg mruby postgresql@9.5 sshtrix wxpython cfn-lint geoipupdate kubeprod msgpack pre-commit sslh xctool cfr-decompiler ghq kubernetes-cli msktutil presto sslscan xmake cgal ghr kubernetes-helm msmtp prettier sslsplit xmrig cglm gibo kubernetes-service-catalog-client mtools proguard stellar-core xonsh cgrep git-cinnabar lasi mupdf proj step xplanet chakra git-ftp latex2html mupdf-tools prometheus stk xsimd charm git-quick-stats ledger mutt proteinortho stout yamllint checkstyle git-remote-hg lego n protoc-gen-go strongswan yelp-tools circleci git-review lf nanopb-generator prototool stunnel ykman citus git-secret lgogdownloader nativefier pstoedit subversion yle-dl clojure git-town libbitcoin nats-streaming-server pulumi suite-sparse you-get cmark-gfm gitg libbitcoin-blockchain nave pure-ftpd sundials youtube-dl cockroach gitlab-runner libbitcoin-client ncdc pybind11 superlu yq cocoapods gitleaks libbitcoin-database ncmpcpp pyenv supervisor yubico-piv-tool cointop gitless libbitcoin-explorer nco pypy swi-prolog z3 composer glib libbitcoin-network ndpi pyside swift-protobuf zim conan glib-networking libbitcoin-node needle qalculate-gtk swiftformat zlog ==> Renamed Formulae gnatsd -> nats-server ==> Deleted Formulae compose2kube erlang@18 gtk-engines gtk-murrine-engine rlvm scala@2.10 swig@3.04 tomcat@6 whirr xmoto ==> Installing dependencies for awscli: gdbm, openssl, readline, sqlite and python ==> Installing awscli dependency: gdbm ==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1.mojave.bottle.1.tar.gz ######################################################################## 100.0% ==> Pouring gdbm-1.18.1.mojave.bottle.1.tar.gz 🍺 /usr/local/Cellar/gdbm/1.18.1: 20 files, 586.8KB ==> Installing awscli dependency: openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2s.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/c4/c4a762d719c2be74ac686f1aafabb32f3c5d5ff3a98935c4925a1ddb9c750ee1?__gda__=exp=1560839100~hmac=7d6f5b155d9cf7afe4e7bc6ea461a5b3e3aa279512a0b5652be3372c02b12247&response-content-disposition=attachment%3Bfilename%3 ######################################################################## 100.0% ==> Pouring openssl-1.0.2s.mojave.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash openssl is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have openssl first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find openssl you may need to set: export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include" For pkg-config to find openssl you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/openssl/1.0.2s: 1,795 files, 12.0MB ==> Installing awscli dependency: readline ==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.0_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/fa/faab004773e6449dd97971311cb62a9bbaa44f1483b82640e818f0c355c8266d?__gda__=exp=1560839110~hmac=9934db72450b8741dfc4b0f947672cccb531109a33414816ba282e217e86215d&response-content-disposition=attachment%3Bfilename%3 ######################################################################## 100.0% ==> Pouring readline-8.0.0_1.mojave.bottle.tar.gz ==> Caveats readline is keg-only, which means it was not symlinked into /usr/local, because macOS provides the BSD libedit library, which shadows libreadline. In order to prevent conflicts when programs look for libreadline we are defaulting this GNU Readline installation to keg-only. For compilers to find readline you may need to set: export LDFLAGS="-L/usr/local/opt/readline/lib" export CPPFLAGS="-I/usr/local/opt/readline/include" For pkg-config to find readline you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/readline/8.0.0_1: 48 files, 1.5MB ==> Installing awscli dependency: sqlite ==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.28.0.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/e3/e360850758d2104b4ae9eab8ae57903a37b62c550c779ddf32100720f832508d?__gda__=exp=1560839115~hmac=eef64f2e155ecd8efcf9adb51c074e9a3821d6458287edadf3a23a16ea8f4832&response-content-disposition=attachment%3Bfilename%3 ######################################################################## 100.0% ==> Pouring sqlite-3.28.0.mojave.bottle.tar.gz ==> Caveats sqlite is keg-only, which means it was not symlinked into /usr/local, because macOS provides an older sqlite3. If you need to have sqlite first in your PATH run: echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile For compilers to find sqlite you may need to set: export LDFLAGS="-L/usr/local/opt/sqlite/lib" export CPPFLAGS="-I/usr/local/opt/sqlite/include" For pkg-config to find sqlite you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/sqlite/3.28.0: 11 files, 3.7MB ==> Installing awscli dependency: python ==> Downloading https://homebrew.bintray.com/bottles/python-3.7.3.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/25/25e0099852136c4ef1efd221247d0f67aa71f7b624211b98898f8b46c612f40d?__gda__=exp=1560839120~hmac=bbc23251f233edacbced668da7d563c1b67f5f8bca02963cea5125be1c3225d7&response-content-disposition=attachment%3Bfilename%3 ######################################################################## 100.0% ==> Pouring python-3.7.3.mojave.bottle.tar.gz Error: An unexpected error occurred during the `brew link` step The formula built, but is not symlinked into /usr/local Permission denied @ dir_s_mkdir - /usr/local/Frameworks Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
こまったときのbrew doctor
$ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: The following directories do not exist: /usr/local/sbin You should create these directories and change their ownership to your account. sudo mkdir -p /usr/local/sbin sudo chown -R $(whoami) /usr/local/sbin Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: python
2nd try!
$ brew install awscli ==> Downloading https://homebrew.bintray.com/bottles/awscli-1.16.170.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/41/4148adad96f53c731a24cfbfc8b0400e50ea63501cf99ed76fe66f23b82e49fc?__gda__=exp=1560839638~hmac=ea48cae79823cd20eb2aef38c1f5639214190c877eb79ed269096d770a97ffce&response-content-disposition=attachment%3Bfilename%3 ######################################################################## 100.0% ==> Pouring awscli-1.16.170.mojave.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/aws Target /usr/local/bin/aws already exists. You may want to remove it: rm '/usr/local/bin/aws' To force the link and overwrite all conflicting files: brew link --overwrite awscli To list all files that would be deleted: brew link --overwrite --dry-run awscli Possible conflicting files are: /usr/local/bin/aws -> /usr/local/aws/bin/aws ==> Caveats The "examples" directory has been installed to: /usr/local/share/awscli/examples Bash completion has been installed to: /usr/local/etc/bash_completion.d zsh completions and functions have been installed to: /usr/local/share/zsh/site-functions ==> Summary 🍺 /usr/local/Cellar/awscli/1.16.170: 5,579 files, 50.7MB ==> `brew cleanup` has not been run in 30 days, running now... Removing: /Users/kaneko.keiko/Library/Caches/Homebrew/cmake--3.14.3.mojave.bottle.tar.gz... (14.2MB) Removing: /Users/kaneko.keiko/Library/Caches/Homebrew/nginx--1.15.12.mojave.bottle.tar.gz... (1.2MB) Removing: /usr/local/Cellar/openssl/1.0.2r... (1,795 files, 12.1MB) Removing: /Users/kaneko.keiko/Library/Caches/Homebrew/openssl--1.0.2r.mojave.bottle.tar.gz... (3.7MB) Removing: /usr/local/Cellar/readline/8.0.0... (48 files, 1.5MB) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/pkg-config... (64B) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/cmake... (64B) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/libyaml... (64B) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/nginx... (64B) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/mysql... (954B) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/mysql@5.6... (6.4KB) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/pcre... (64B) Removing: /Users/kaneko.keiko/Library/Logs/Homebrew/openssl... (64B) Pruned 0 symbolic links and 2 directories from /usr/local
$ brew install awscli Warning: awscli 1.16.170 is already installed, it's just not linked You can use `brew link awscli` to link this version.
エラーメッセージでおしえてくれているコマンドを実行
$ brew link awscli Linking /usr/local/Cellar/awscli/1.16.170... Error: Could not symlink bin/aws Target /usr/local/bin/aws already exists. You may want to remove it: rm '/usr/local/bin/aws' To force the link and overwrite all conflicting files: brew link --overwrite awscli To list all files that would be deleted: brew link --overwrite --dry-run awscli
(状況的に最適と判断して)
$ brew link --overwrite --dry-run awscli Would remove: /usr/local/bin/aws -> /usr/local/aws/bin/aws
これでできました。
エラーログをよく読もうというのもあるし、今後brew
でうまく入れられなかったらbrew doctor
は活用したいなと思いました。