More than 1 year has passed since last update.

posted at

Homebrew をインストールしたはずなのにbash: brew: command not foundになる。


aws: cloud9
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]


install時にWarning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.)パスがないと怒られました。
brewコマンドを叩いてみても、 「-bash: brew: コマンドが見つかりません」となります。

loning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 387, done.
remote: Counting objects: 100% (387/387), done.
remote: Compressing objects: 100% (210/210), done.
remote: Total 895969 (delta 244), reused 283 (delta 177), pack-reused 895582
Receiving objects: 100% (895969/895969), 323.15 MiB | 25.72 MiB/s, done.
Resolving deltas: 100% (614005/614005), done.
Tapped 2 commands and 5124 formulae (5,397 files, 356.7MB).
Already up-to-date.
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.======問題の部分=====
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
- Install the Homebrew dependencies if you have sudo access:
  Debian, Ubuntu, etc.
    sudo apt-get install build-essential
  Fedora, Red Hat, CentOS, etc.
    sudo yum groupinstall 'Development Tools'
  See https://docs.brew.sh/linux for more information.
- Configure Homebrew in your /home/ec2-user/.bash_profile by running
    echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/ec2-user/.bash_profile
- Add Homebrew to your PATH
    eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
- We recommend that you install GCC by running:
    brew install gcc


echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>  ~/.bashrc
source ~/.bashrc

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
What you can do with signing up