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.

Macでシェルを実行するとbash/rとエラーが出るとき

0
Posted at

install.sh を実行すると bash/r とエラーが出ました。原因は改行コードです。WindowsからMacに持ってきたのが原因なのでしょう。

解決方法:ファイルの改行を変換

sed $'s/\r$//' ./install.sh > ./install2.sh

現在 bash か zsh かを調べる方法

echo $SHELL

/bin/bash or /bin/zsh

bash と zsh を変える方法(要ターミナル再起動)

chsh -s /bin/bash 
 or
chsh -s /bin/zsh 

あとがき

私は全く別の場所を調べて数時間無駄にしました。この記事で解決できた人がいれば幸いです。

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?