Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Amazon Linux2でHomebrewのインストール

はじめに

Amazon Linux2でHomebrewのインストールをおこなったので、備忘録としてメモを残しておく。

インストール

Homebrewを参考にインストール。

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

そうするとパスがないと下記の注意が表示される。

Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.

そのため下記のコマンドを実行すると使えるようになる。

export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH

念のためHomebrewがインストールされているか確認。

brew -v

We recommend that you install GCC: brew install gccと推奨されてたので、gccもインストールしておいたほうがよさそう。

brew install gcc

注意や推奨の内容

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:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

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

参考
https://www.it-swarm-ja.tech/ja/ruby/homebrew%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%82%A8%E3%83%A9%E3%83%BCbrew%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%8C%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93/1069923138/

blackpeach7
駆け出しエンジニア向けに情報発信をしております。初心者向けにエラーで詰まった所や、まとめ記事をあげていきます。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away