1
2

More than 3 years have passed since last update.

Mac homebrew caskを使えるようにする

Posted at

目的

  • homebrew caskを使ったことなかったので使用方法をまとめる

条件

  • MacのPCにてhomebrewが使用できる状態になっていること。

実施方法

  1. homebrew caskのインストール

    1. ターミナルにて下記コマンドを実行する。

      $ brew cask
      
    2. 下記のように出力されれば正常にインストールされている。

      [21:05:59]shun-no-MacBook-Air~$ brew cask
      ==> Tapping homebrew/cask
      Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
      remote: Enumerating objects: 16, done.
      remote: Counting objects: 100% (16/16), done.
      remote: Compressing objects: 100% (14/14), done.
      remote: Total 416303 (delta 6), reused 4 (delta 2), pack-reused 416287
      Receiving objects: 100% (416303/416303), 189.27 MiB | 2.96 MiB/s, done.
      Resolving deltas: 100% (294141/294141), done.
      Updating files: 100% (3628/3628), done.
      Tapped 1 command and 3536 casks (3,653 files, 203MB).
      Homebrew Cask provides a friendly CLI workflow for the administration
      of macOS applications distributed as binaries.
      
      Commands:
      
          --cache    display the file used to cache the Cask
          audit      verifies installability of Casks
          cat        dump raw source of the given Cask to the standard output
          create     creates the given Cask and opens it in an editor
          doctor     checks for configuration issues
          edit       edits the given Cask
          fetch      downloads remote application files to local cache
          home       opens the homepage of the given Cask
          info       displays information about the given Cask
          install    installs the given Cask
          list       with no args, lists installed Casks; given installed Casks, lists staged files
          outdated   list the outdated installed Casks
          reinstall  reinstalls the given Cask
          style      checks Cask style using RuboCop
          uninstall  uninstalls the given Cask
          upgrade    upgrades all outdated casks
          zap        zaps all files associated with the given Cask
      
      See also "man brew-cask"
      

アプリをインストールする

  1. インストールコマンドを下記に記載する。

    $ brew cask install アプリ名
    

付録

  • homebrew caskを使用してAndroid Studioをインストールした時のログを下記に記載する。
[21:18:59]shun-no-MacBook-Air~$ brew cask install android-studio
Updating Homebrew...
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
bic                                cassandra-cpp-driver               iblinter                           polynote                           wapm
biosig                             gh                                 libfido2                           protoc-gen-grpc-web
cargo-instruments                  go@1.13                            literate-git                       terraform-provider-libvirt
==> Updated Formulae
readline ✔               cloud-watch              frege                    jetty-runner             mvnvm                    py3cairo                 terraform
ruby-build ✔             cobalt                   frege-repl               jflex                    n                        rav1e                    terragrunt
aliyun-cli               consul                   galen                    jhipster                 nagios-plugins           rds-command-line-tools   tflint
angular-cli              contentful-cli           gatsby-cli               joshua                   ncurses                  redpen                   tika
ansible                  crc                      gcviewer                 jruby                    netdata                  renameutils              tomcat
apache-spark             cromwell                 gdb                      jsonschema2pojo          netlify-cli              repo                     tomcat-native
apollo-cli               crowdin                  gdcm                     jsvc                     newman                   sbt                      tomcat@7
arduino-cli              crystal-icr              ghc@8.6                  k6                       nfdump                   sbuild                   tomcat@8
asciidoctorj             csound                   git-archive-all          kaitai-struct-compiler   ngt                      scala                    topgrade
atlassian-cli            cstore_fdw               git-credential-manager   kawa                     nifi                     scala@2.12               traefik@1
aurora-cli               deno                     git-fixup                kcptun                   nomad                    sccache                  typescript
autorest                 dependency-check         gitbucket                kompose                  now-cli                  sdedit                   ucon64
aws-cdk                  derby                    gitlab-runner            krb5                     ocrmypdf                 serverless               umlet
aws-cfn-tools            detekt                   glade                    kubectx                  octave                   shairport-sync           unbound
aws-okta                 devdash                  glooctl                  kubeseal                 ode                      shellharden              unifdef
aws-sdk-cpp              devspace                 go                       kubespy                  okteto                   shfmt                    upscaledb
bagit                    dita-ot                  go-bindata               kumo                     opa                      siege                    urh
balena-cli               ditaa                    go-jira                  languagetool             openapi-generator        signal-cli               v8
ballerina                ec2-ami-tools            godep                    lazygit                  openjdk@11               sjk                      vale
basex                    ec2-api-tools            golo                     lcm                      openssh                  sk                       vault-cli
bazel                    ed                       goreleaser               lego                     orientdb                 skaffold                 vaulted
beagle                   ejabberd                 gradle                   libpulsar                pandoc-crossref          skinny                   vegeta
berglas                  elb-tools                grafana                  libsoup                  parallel                 smali                    vert.x
bfg                      elixir                   groovy                   libstfl                  pgweb                    sn0int                   vnu
binaryen                 ensmallen                groovysdk                liquidctl                php                      snapcraft                vulkan-headers
bind                     etcd                     grpc                     mahout                   php@7.2                  solr                     walkmod
bit                      exploitdb                hadoop                   mallet                   php@7.3                  solr@7.7                 wasmer
boot-clj                 faas-cli                 hcloud                   mesa                     picard-tools             sonarqube                weaver
bundletool               fastbit                  helm                     meson                    pig                      sonarqube-lts            weechat
byobu                    fastlane                 helmfile                 micro                    plantuml                 sphinx-doc               wildfly-as
byteman                  fastqc                   hmmer                    micronaut                pmd                      spotbugs                 wiremock-standalone
carrot2                  fetchmail                hugo                     mill                     postgis                  sqlcipher                wireshark
cfn-lint                 ffuf                     i2pd                     minikube                 prestodb                 sqoop                    wtfutil
cfr-decompiler           findomain                igv                      minio                    prestosql                stanford-corenlp         xapian
cgal                     flashrom                 ipfs                     minio-mc                 procs                    stanford-ner             xmake
chisel                   flawfinder               jadx                     mk-configure             procyon-decompiler       stanford-parser          xmlsectool
circleci                 flow                     jasmin                   mmark                    proftpd                  stlink                   yle-dl
clojure                  fluid-synth              javacc                   mmseqs2                  protobuf-c               swagger2markup-cli       yq
clojure-lsp              flume                    jboss-forge              mockserver               protoc-gen-go            tailor                   zabbix
clojurescript            flyway                   jdnssec-tools            molecule                 pulumi                   tee-clc
closure-compiler         fmpp                     jenkins                  monetdb                  pumba                    telegraf
closure-stylesheets      fop                      jetty                    mongo-c-driver           pwntools                 teleport
==> Deleted Formulae
ghc@8.2                                     jpcsp                                       openjdk@12                                  sshrc

==> Downloading https://dl.google.com/dl/android/studio/install/3.6.0.21/android-studio-ide-192.6200805-mac.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'android-studio'.
==> Installing Cask android-studio
==> Moving App 'Android Studio.app' to '/Applications/Android Studio.app'.
🍺  android-studio was successfully installed!
  • 前述の出力がなされた後、アプリケーションのフォルダを確認したところ、Andorid Studioがインストールされていた。

    スクリーンショット 2020-02-27 21.30.20.png

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2