LoginSignup
6
7

More than 5 years have passed since last update.

UbuntuでHerokuを使おうと思ったらエラーになった

Last updated at Posted at 2018-09-03

前提

・Bash On Ubuntu On Windowsを使用
・Windows10

herokuのインストールはこちらの記事を参考にしました。
Heroku CLI を ubuntuに入れる

エラー概要

インストール完了。

$ wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh

まずはherokuを呼んでみる

$ heroku --version

あ、あれ…?

/mnt/c/Program Files/heroku/bin/../client/bin/heroku.cmd: 1: /mnt/c/Program Files/heroku/bin/../client/bin/heroku.cmd: @echo: not found
/mnt/c/Program Files/heroku/bin/../client/bin/heroku.cmd: 2: /mnt/c/Program Files/heroku/bin/../client/bin/heroku.cmd: setlocal: not found
/mnt/c/Program Files/heroku/bin/../client/bin/heroku.cmd: 4: /mnt/c/Program Files/heroku/bin/../client/bin/heroku.cmd: Syntax error: "(" unexpected (expecting "then")

なぜか怒涛のエラーメッセージ。

解決法

ということで調べたら次の記事が。
heroku push postgres WINDOWS 10

その中のコメントに、

have you tried with sudo heroku ... ? – Aserre Dec 18 '17 at 10:53

お?
ということでやってみる。

$ sudo heroku

できた!!!

考察

管理者権限が必要ってことですね。

6
7
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
6
7