LoginSignup
1
0

More than 1 year has passed since last update.

[CircleCI CLI]インストールエラー"mv: cannot move 'circleci' to '/usr/local/bin/circleci': Permission denied"の対処法。

Posted at

はじめに

.circleci/config.ymlのバリデーションを行うため、公式ドキュメントに記載されているコマンドでCircleCI CLIをインストール。

curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | sudo bash

するとこんなエラーが発生。

Starting installation.
Installing CircleCI CLI バージョン
Installing to /usr/local/bin
mv: cannot move 'circleci' to '/usr/local/bin/circleci': Permission denied
An error occured installing the tool.
The contents of the directory /tmp/7RkvButnut have been left in place to help to debug the issue.

移動できないとかなんとからしいです。
手動で移動しろということでしょうか。

対処方法

こちらのissueを参考にしました。

エラーメッセージで「/tmp/7RkvButnutにあるよ~」と言われているので、
/tmp/7RkvButnutに移動。
/tmp/7RkvButnut内のcircleciファイルを/usr/local/binに移動させる。

sudo mv circleci /usr/local/bin

これで一時ファイルからの移動は完了。

というわけで上手くいったかどうか確かめてみる。

.circleci/config.ymlの親ディレクトリに移動して、

$ circleci config validate

# 構文に間違いがなければ、このメッセージ。
Config file at .circleci/config.yml is valid.

問題なくバリデーションが実行できました。

おわりに

作業効率のためにも、無事にバリデーションが使えるようになって良かったです。

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