Help us understand the problem. What is going on with this article?

heroku のCLIをOracleLinuxにインストールする

More than 1 year has passed since last update.

公式サイトを見てみる

https://devcenter.heroku.com/articles/heroku-cli
それらしきスクリプトを実行するもエラー。。

ググる

http://blog.tokoyax.com/entry/heroku/command-install
これに沿ってやってみる。
-1.wgetで取得

$ sudo wget -qO- https://toolbelt.heroku.com/install.sh --no-check-certificate | sh
This script requires superuser access to install software.
You will be prompted for your password by sudo.
Add the Heroku CLI to your PATH using:
$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile

-2.コマンドへパスを通す

$ vi ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin

heroku のパスを追加

PATH=/usr/local/heroku/bin:$PATH
export PATH

-3.profileをリロード

$ source ~/.bash_profile

-4.バージョンの確認

$ heroku -version

最新じゃないのでとってきてくれるっぽい。

$ heroku --version
WARNING: This is the legacy Heroku CLI with limited functionality. Please install the latest CLI.
WARNING: Installation instructions are at https://cli.heroku.com
heroku-cli: Installing CLI... 25.58MB/25.58MB
heroku-cli/5.12.0-0ab8352 (linux-amd64) go1.7.5

それでもやっぱり最新じゃないっていうエラーなので初心に戻って以下を実行

$ wget https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli-linux-x64.tar.gz -O 
heroku.tar.gz
$ tar -xvzf heroku.tar.gz
$ mkdir -p /usr/local/lib /usr/local/bin
$ mv heroku-cli-v6.13.18-a444c52-linux-x64 /usr/local/lib/heroku
$ ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku

heokuはどこにあるか確認。

$ which heroku
/usr/local/bin/heroku

heroku バージョン確認

$ heroku --version
heroku-cli/6.13.18-a444c52 (linux-x64) node-v8.3.0
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
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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