質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Q&A

1回答

3616閲覧

Homebrewの Warning: Homebrew's sbin was not found in your PATH but you have installed formulae..が消えない

DrqYuto

総合スコア432

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

0グッド

0クリップ

投稿2019/06/23 05:52

echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

した後に、

source ~/.zshrc

しても。

Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so: echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

と出ます。

環境は
echo $PATH
すると、

/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/Users/user_name/.rbenv/versions/2.4.1/bin:/Users/kuguminatoyuto/.rbenv/shims:/usr/local/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/qt@5.5/bin:/Users/kuguminatoyuto/.pyenv/shims:/Users/kuguminatoyuto/.pyenv/bin:/Users/kuguminatoyuto/Library/Haskell/bin:/usr/local/opt/ghc@8.0/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/ncurses/bin:/usr/local/opt/openssl@1.1/bin:/usr/local/var/pyenv/shims:/Users/kuguminatoyuto/.nodebrew/current/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin#openssl@1.1の設定

echo $SHELL
すると、

/bin/zsh

cat ~/.zshrc
すると、

export LANG=ja_JP.UTF-8 autoload colors colors case ${UID} in 0) PROMPT="%B%{${fg[green]}%}%/#%{${reset_color}%}%b " PROMPT2="%B%{${fg[green]}%}%_#%{${reset_color}%}%b " SPROMPT="%B%{${fg[green]}%}%r is correct? [n,y,a,e]:%{${reset_color}%}%b " [ -n "${REMOTEHOST}${SSH_CONNECTION}" ] && PROMPT="%{${fg[cyan]}%}$(echo ${HOST%%.*} | tr '[a-z]' '[A-Z]') ${PROMPT}" ;; *) PROMPT="%{${fg[green]}%}%/%%%{${reset_color}%} " PROMPT2="%{${fg[green]}%}%_%%%{${reset_color}%} " SPROMPT="%{${fg[green]}%}%r is correct? [n,y,a,e]:%{${reset_color}%} " [ -n "${REMOTEHOST}${SSH_CONNECTION}" ] && PROMPT="%{${fg[cyan]}%}$(echo ${HOST%%.*} | tr '[a-z]' '[A-Z]') ${PROMPT}" ;; esac case "${OSTYPE}" in freebsd*|darwin*) alias ls="ls -G -w" ;; linux*) alias ls="ls --color" ;; esac # Path to your oh-my-zsh installation. export ZSH=/Users/kuguminatoyuto/.oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. ZSH_THEME="robbyrussell" # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" # Uncomment the following line to disable bi-weekly auto-update checks. # DISABLE_AUTO_UPDATE="true" # Uncomment the following line to change how often to auto-update (in days). # export UPDATE_ZSH_DAYS=13 # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" # Uncomment the following line to disable auto-setting terminal title. # DISABLE_AUTO_TITLE="true" # Uncomment the following line to enable command auto-correction. # ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # COMPLETION_WAITING_DOTS="true" # Uncomment the following line if you want to disable marking untracked files # under VCS as dirty. This makes repository status check for large repositories # much, much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" # Uncomment the following line if you want to change the command execution time # stamp shown in the history command output. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" # HIST_STAMPS="mm/dd/yyyy" # Would you like to use another custom folder than $ZSH/custom? # ZSH_CUSTOM=/path/to/new-custom-folder # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=(git) # User configuration export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" # export MANPATH="/usr/local/man:$MANPATH" source $ZSH/oh-my-zsh.sh # You may need to manually set your language environment # export LANG=en_US.UTF-8 # Preferred editor for local and remote sessions # if [[ -n $SSH_CONNECTION ]]; then # export EDITOR='vim' # else # export EDITOR='mvim' # fi # Compilation flags # export ARCHFLAGS="-arch x86_64" # ssh # export SSH_KEY_PATH="~/.ssh/dsa_id" # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh # users are encouraged to define aliases within the ZSH_CUSTOM folder. # For a full list of active aliases, run `alias`. # # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" export PATH=$HOME/.nodebrew/current/bin:$PATH export PYENV_ROOT=/usr/local/var/pyenv if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi # alias brew="env PATH=${PATH//Users/kuguminatoyuto/.phpenv/shims:/} brew" alias brew="PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin brew" export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"#openssl@1.1の設定 alias vi="vim" # alias sjis="iconv -f cp932"#ターミナルで SJIS の文字化けを避ける export PATH="/usr/local/opt/ncurses/bin:$PATH" export PATH="/usr/local/opt/libpcap/bin:$PATH" export PATH="/usr/local/opt/ghc@8.0/bin:$PATH" export PATH=$HOME/Library/Haskell/bin:$PATH export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" export PATH="/usr/local/opt/qt@5.5/bin:$PATH" autoload -Uz colors colors PROMPT="%(?.%{${fg[green]}%}.%{${fg[red]}%})[%n@%m]%{${reset_color}%} %# " printf '\e[9;1t' p=$PATH;PATH=;/usr/libexec/path_helper -s >> ~/.zprofile;PATH=$p export PATH="/usr/local/opt/sqlite/bin:$PATH" export PATH=/usr/local/bin:"$PATH" eval "$(rbenv init -)" path=( /usr/local/{bin,sbin} /Users/user_name/.rbenv/versions/2.4.1/bin $path ) alias history='fc -l' export PATH="/usr/local/sbin:$PATH" export PATH="/usr/local/sbin:$PATH" export PATH="/usr/local/sbin:$PATH"

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

https://teratail.com/questions/186322 と同じ状況ではないでしょうか。
.zshrcalias brew=の行を次のように変更するとどうでしょう。

zsh

1alias brew='PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin brew'

投稿2019/06/25 17:47

harrek

総合スコア123

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

DrqYuto

2019/06/26 08:03

なるほど。今は実機がないので週末試してみます。ありがとうございます。
DrqYuto

2019/06/29 07:49

122行目に挿入しましたが、brew doctorしてもダメで同じ結果でした。 ``` 1 export LANG=ja_JP.UTF-8 2 3 autoload colors 4 colors 5 case ${UID} in 6 0) 7 PROMPT="%B%{${fg[green]}%}%/#%{${reset_color}%}%b " 8 PROMPT2="%B%{${fg[green]}%}%_#%{${reset_color}%}%b " 9 SPROMPT="%B%{${fg[green]}%}%r is correct? [n,y,a,e]:%{${reset_color}%}%b " 10 [ -n "${REMOTEHOST}${SSH_CONNECTION}" ] && 11 PROMPT="%{${fg[cyan]}%}$(echo ${HOST%%.*} | tr '[a-z]' '[A-Z]') ${PROMPT}" 12 ;; 13 *) 14 PROMPT="%{${fg[green]}%}%/%%%{${reset_color}%} " 15 PROMPT2="%{${fg[green]}%}%_%%%{${reset_color}%} " 16 SPROMPT="%{${fg[green]}%}%r is correct? [n,y,a,e]:%{${reset_color}%} " 17 [ -n "${REMOTEHOST}${SSH_CONNECTION}" ] && 18 PROMPT="%{${fg[cyan]}%}$(echo ${HOST%%.*} | tr '[a-z]' '[A-Z]') ${PROMPT}" 19 ;; 20 esac 21 22 case "${OSTYPE}" in 23 freebsd*|darwin*) 24 alias ls="ls -G -w" 25 ;; 26 linux*) 27 alias ls="ls --color" 28 ;; 29 esac 30 31 # Path to your oh-my-zsh installation. 32 33 export ZSH=/Users/kuguminatoyuto/.oh-my-zsh 34 35 # Set name of the theme to load. 36 # Look in ~/.oh-my-zsh/themes/ 37 # Optionally, if you set this to "random", it'll load a random theme each 38 # time that oh-my-zsh is loaded. 39 ZSH_THEME="robbyrussell" 40 41 # Uncomment the following line to use case-sensitive completion. 42 # CASE_SENSITIVE="true" 43 44 # Uncomment the following line to disable bi-weekly auto-update checks. 45 # DISABLE_AUTO_UPDATE="true" 46 47 # Uncomment the following line to change how often to auto-update (in days). 48 # export UPDATE_ZSH_DAYS=13 49 50 # Uncomment the following line to disable colors in ls. 51 # DISABLE_LS_COLORS="true" 52 53 # Uncomment the following line to disable auto-setting terminal title. 54 # DISABLE_AUTO_TITLE="true" 55 56 # Uncomment the following line to enable command auto-correction. 57 # ENABLE_CORRECTION="true" 58 59 # Uncomment the following line to display red dots whilst waiting for completion. 60 # COMPLETION_WAITING_DOTS="true" 61 62 # Uncomment the following line if you want to disable marking untracked files 63 # under VCS as dirty. This makes repository status check for large repositories 64 # much, much faster. 65 # DISABLE_UNTRACKED_FILES_DIRTY="true" 66 67 # Uncomment the following line if you want to change the command execution time 68 # stamp shown in the history command output. 69 # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 70 71 # HIST_STAMPS="mm/dd/yyyy" 72 73 # Would you like to use another custom folder than $ZSH/custom? 74 # ZSH_CUSTOM=/path/to/new-custom-folder 75 76 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 77 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 78 # Example format: plugins=(rails git textmate ruby lighthouse) 79 # Add wisely, as too many plugins slow down shell startup. 80 plugins=(git) 81 82 # User configuration 83 84 export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" 85 # export MANPATH="/usr/local/man:$MANPATH" 86 87 source $ZSH/oh-my-zsh.sh 88 89 # You may need to manually set your language environment 90 # export LANG=en_US.UTF-8 91 92 # Preferred editor for local and remote sessions 93 # if [[ -n $SSH_CONNECTION ]]; then 94 # export EDITOR='vim' 95 # else 96 # export EDITOR='mvim' 97 # fi 98 99 # Compilation flags 100 # export ARCHFLAGS="-arch x86_64" 101 102 # ssh 103 # export SSH_KEY_PATH="~/.ssh/dsa_id" 104 105 # Set personal aliases, overriding those provided by oh-my-zsh libs, 106 # plugins, and themes. Aliases can be placed here, though oh-my-zsh 107 # users are encouraged to define aliases within the ZSH_CUSTOM folder. 108 # For a full list of active aliases, run `alias`. 109 # 110 # Example aliases 111 # alias zshconfig="mate ~/.zshrc" 112 # alias ohmyzsh="mate ~/.oh-my-zsh" 113 114 export PATH=$HOME/.nodebrew/current/bin:$PATH 115 116 export PYENV_ROOT=/usr/local/var/pyenv 117 if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi 118 119 # alias brew="env PATH=${PATH//Users/kuguminatoyuto/.phpenv/shims:/} brew" 120 121 alias brew="PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin brew" 122 alias brew='PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin brew' 123 124 export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"#openssl@1.1の設定 125 alias vi="vim" 126 # 127 128 alias sjis="iconv -f cp932"#ターミナルで SJIS の文字化けを避ける 129 export PATH="/usr/local/opt/ncurses/bin:$PATH" 130 export PATH="/usr/local/opt/libpcap/bin:$PATH" 131 export PATH="/usr/local/opt/ghc@8.0/bin:$PATH" 132 export PATH=$HOME/Library/Haskell/bin:$PATH 133 export PYENV_ROOT="$HOME/.pyenv" 134 export PATH="$PYENV_ROOT/bin:$PATH" 135 eval "$(pyenv init -)" 136 export PATH="/usr/local/opt/qt@5.5/bin:$PATH" 137 autoload -Uz colors 138 colors 139 PROMPT="%(?.%{${fg[green]}%}.%{${fg[red]}%})[%n@%m]%{${reset_color}%} %# " 140 printf '\e[9;1t' 141 p=$PATH;PATH=;/usr/libexec/path_helper -s >> ~/.zprofile;PATH=$p 142 export PATH="/usr/local/opt/sqlite/bin:$PATH" 143 export PATH=/usr/local/bin:"$PATH" 144 eval "$(rbenv init -)" 145 path=( 146 /usr/local/{bin,sbin} 147 /Users/user_name/.rbenv/versions/2.4.1/bin 148 $path 149 ) 150 alias history='fc -l' 151 152 export PATH="/usr/local/sbin:$PATH" 153 export PATH="/usr/local/sbin:$PATH" 154 export PATH="/usr/local/sbin:$PATH" 155 export PATH="/usr/local/sbin:$PATH" ```
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問