0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

IBM Cloud CLIをインストールした際に'yum' is not found のエラーが発生する

Posted at

概要

CentOSコンテナにIBM Cloud CLIをインストールしようとしたところ以下のエラーが発生

[root@67df88b1cc41 /]# curl -sL https://ibm.biz/idt-installer | bash
[main] --==[ IBM Cloud Developer Tools for Linux/MacOS - Installer, v1.2.3 ]==--
main: line 82: which: command not found
[install] Starting Update...
main: line 89: which: command not found
[install_deps_with_yum] Checking for and updating 'yum' support on Linux
main: line 240: which: command not found
[install_deps_with_yum] ERROR: 'yum' is not found. That's the only RedHat/Centos linux installer I know, sorry.

調査

yumが本当にないのか

yum -v

実行結果から、もちろんyumはインストール済み。
よって、エラーメッセージ通りの問題ではない。

IBM Cloud Developer Tool の Installerを調査

Github(https://github.com/IBM-Cloud/ibm-cloud-developer-tools/blob/master/linux-installer/idt-installer )に、エラーメッセージを発見

if [[ -z "$(which yum)" ]]; then
  error "'yum' is not found.  That's the only RedHat/Centos linux installer I know, sorry."
fi

上記より、which yum がエラーになったことがわかる。
実際にコマンドを実行してみる

[root@67df88b1cc41 /]# which yum
bash: which: command not found

結論として、which コマンドがないことがわかった。

対策

which コマンドのインストール

yum install which

結果

再度、IBM Cloud CLIをインストールする

[root@67df88b1cc41 /]# curl -sL https://ibm.biz/idt-installer | bash
[main] --==[ IBM Cloud Developer Tools for Linux/MacOS - Installer, v1.2.3 ]==--
which: no ibmcloud in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
[install] Starting Update...
which: no ibmcloud in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
[install_deps_with_yum] Checking for and updating 'yum' support on Linux
[install_deps_with_yum] Installing/updating external dependency: curl
[install_deps_with_yum] Installing/updating external dependency: git
which: no git in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:02:33 ago on Wed Oct  7 16:08:35 2020.
Dependencies resolved.
...
[install_plugins] Finished installing/updating plugins
[env_setup] WARN: Please restart your shell to enable 'ic' alias for ibmcloud!
[install] Install finished.
[main] --==[ Total time: 138 seconds ]==--

インストールの確認

[root@67df88b1cc41 /]# ibmcloud -v
ibmcloud version 1.2.3+3577aee6-2020-09-25T14:34:09+00:00

正常にインストールすることができた。

0
0
0

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
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?