#環境
AWS cloud9
#詰まった箇所
1.5.1 Herokuのセットアップとデプロイ
手順通り
source <(curl -sL https://cdn.learnenough.com/heroku_install)
を実行したら下記のエラーが出た
cloud9console
ubuntu:~/environment/sample_app (master) $ source <(curl -sL https://cdn.learnenough.com/heroku_install)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30.5M 100 30.5M 0 0 26.1M 0 0:00:01 0:00:01 --:--:-- 26.1M
mv: cannot move 'heroku' to '/usr/local/heroku': Directory not empty
ここでHerokuのバージョン確認をした時のコマンド結果を思いだした
cloud9
ubuntu:~/environment/sample_app (master) $ heroku --version
Command 'heroku' not found, but can be installed with:
sudo snap install heroku
sudo snap install herokuを指示通り打ってみた
cloud9
ubuntu:~/environment/sample_app (master) $ sudo snap install heroku
error: This revision of snap "heroku" was published using classic confinement and thus may perform
arbitrary system changes outside of the security sandbox that snaps are usually confined to,
which may put your system at risk.
If you understand and want to proceed repeat the command including --classic.
--classicオプションをつけろと怒られたのでもう一度トライ
cloud9
ubuntu:~/environment/sample_app (master) $ sudo snap install heroku --classic
heroku v7.47.6 from Heroku✓ installed
無事Herokuインストールできました
cloud9
ubuntu:~/environment/sample_app (master) $ heroku -v
› Warning: Our terms of service have changed: https://dashboard.heroku.com/terms-of-service
heroku/7.47.6 linux-x64 node-v12.16.2