teratailでcloud9にHomebrewを入れたいという質問があって、Homebrew入れれんだろという話をしてたのですがどうやらそうでもないようだったので久々にcloud9を使ってみた。
どうやら、いつのまにかcloud9はDockerのコンテナとしてアプリケーションが立ち上がるようになってました。凄いぞcloud9。
Linuxbrewをインストール
Homebrewは入れれないのでLinuxbrewを入れます。
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)"
==> This script will install:
/home/ubuntu/.linuxbrew/bin/brew
/home/ubuntu/.linuxbrew/Library/...
/home/ubuntu/.linuxbrew/share/man/man1/brew.1
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Counting objects: 340632, done.
remote: Compressing objects: 100% (4397/4397), done.
remote: Total 340632 (delta 3079), reused 0 (delta 0), pack-reused 336215
Receiving objects: 100% (340632/340632), 66.19 MiB | 12.82 MiB/s, done.
Resolving deltas: 100% (256969/256969), done.
From https://github.com/Homebrew/linuxbrew
* [new branch] master -> origin/master
HEAD is now at cefb848 expat: update 2.1.0_1 bottle for Linuxbrew.
Warning: /home/ubuntu/.linuxbrew/bin is not in your PATH.
==> Installation successful!
==> Next steps
Install the Linuxbrew dependencies:
Debian, Ubuntu, etc.:
`sudo apt-get install build-essential`
Fedora, Red Hat, CentOS, etc.:
`sudo yum groupinstall 'Development Tools'`
See http://brew.sh/linuxbrew/#dependencies for more information.
Run `brew doctor` before you install anything
Run `brew help` to get started
確認
$ brew doctor
bash: brew: command not found
パスが通ってない模様。
パスを通す
一旦はそのまま通せばいいよね
$ export PATH=$PATH:/home/ubuntu/.linuxbrew/bin
確認
$ 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 and just ignore them. Thanks!
Warning: /tmp is world-writable but does not have the sticky bit set.
Please execute `sudo chmod +t /tmp` in your Terminal
tmpディレクトリを書き込み可能にする
$ sudo chmod +t /tmp
確認
$ brew doctor
Your system is ready to brew.
これで使えそう。
これ時間経ったらコンテナ消えるのだろうか、どうなのだろうか。