1
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?

macOS での Session Manager プラグインのインストールで `Failed to create symlink` になった件

Posted at

まっさらな MacBook Pro がやってきたのでセットアップして必要な環境作っていくときにちょっぴりハマった話。

環境

  • Apple M3 Pro
  • macOS Sonoma 14.1

AWS CLI でセッション繋ぐ

$ aws ssm start-session --target i-XXXXXXXX

SessionManagerPlugin is not found. Please refer to SessionManager Documentation here: http://docs.aws.amazon.com/console/systems-manager/session-manager-plugin-not-found

SessionManagerPlugin ない言われた。

macOS での Session Manager プラグインのインストール(公式) に書いてる手順に従って

1.バンドルされたインストーラをダウンロードします。

curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/sessionmanager-bundle.zip" -o "sessionmanager-bundle.zip"

2.パッケージを解凍します。

unzip sessionmanager-bundle.zip

3.インストールコマンドを実行します。

$ sudo ./sessionmanager-bundle/install -i /usr/local/sessionmanagerplugin -b /usr/local/bin/session-manager-plugin

Password:
Creating Symlink from /usr/local/sessionmanagerplugin/bin/session-manager-plugin to /usr/local/bin/session-manager-plugin
Failed to create symlink.
Please add /usr/local/sessionmanagerplugin/bin to your $PATH to use Session Manager Plugin.

おや?

ググってみてもズバリ同じエラーのものが見あたらない:thinking:

Please add /usr/local/sessionmanagerplugin/bin to your $PATH to use Session Manager Plugin.

なるほど?

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

追加してみた

$ sudo ./sessionmanager-bundle/install -i /usr/local/sessionmanagerplugin -b /usr/local/bin/session-manager-plugin

Password:
Creating Symlink from /usr/local/sessionmanagerplugin/bin/session-manager-plugin to /usr/local/bin/session-manager-plugin
Failed to create symlink.
Please add /usr/local/sessionmanagerplugin/bin to your $PATH to use Session Manager Plugin.

:cry:

うーむ

Creating Symlink from /usr/local/sessionmanagerplugin/bin/session-manager-plugin to /usr/local/bin/session-manager-plugin

なのでそのへんを見てみる。

$ ls -la /usr/local/
total 0
drwxr-xr-x   4 root  wheel  128  3 22 16:22 .
drwxr-xr-x@ 11 root  wheel  352 10 14 13:08 ..
drwxr-xr-x@  6 root  wheel  192  3 22 16:22 sessionmanagerplugin

bin がないんですが?

$ sudo mkdir /usr/local/bin/

作ってみた

$ sudo ./sessionmanager-bundle/install -i /usr/local/sessionmanagerplugin -b /usr/local/bin/session-manager-plugin

Creating Symlink from /usr/local/sessionmanagerplugin/bin/session-manager-plugin to /usr/local/bin/session-manager-plugin
Installation successful!

単純な話だったけどなぜ /user/local/bin なかったんや:thinking:

1
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
1
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?