
brew doctorでWarningが出た時にする対処方法のメモ
先日Homebrewでインストールをすることがあったので、アップデートと合わせてHomebrewの状態をdoctorコマンドしてみたところWarningがいくつか出てきたので対処方法を備忘録として残しておきました。
パス末尾のスラッシュ
今回はこれで無事にエラーがなくなりました。
Warning: Some directories in your path end in a slash. Directories in your path should not end in a slash. This can break other doctor checks. The following directories should be edited:パスがスラッシュで終わっていることが原因のようで、該当するものでパスの末尾がスラッシュになっている部分を削除して修正します。 configファイルの存在
Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts:該当するconfigファイルがbrew実行時に競合する恐れがあるという警告とのこと、brew実行時のみ該当するパスを除外させるため、.bashrcに下記のような形でエイリアスを記述します。 【.bashrc】
########## /Applications/MAMP/bin/php/php7.0.15/bin/php-config の場合 ##########
alias brew="env PATH=${PATH/\/Applications\/MAMP\/\bin\/\php\/\php7.0.15\/bin:/} brew"
/usr/local/sbinが無い
Warning: The following directories do not exist: /usr/local/sbinOSをアップデートしたら起こるようになりました。新たに生成する必要があるとのことです。エラー表示の直後に下記のコマンドが案内されていたので、そのまま実行します。
sudo mkdir -p /usr/local/sbin sudo chown -R $(whoami) /usr/local/sbinシンボリックリンクが壊れている
Warning: Broken symlinks were found. Remove them with `brew cleanup`:ファイルを削除した際に、シンボリックリンクが残っている場合などに発生するエラーです。メッセージにもある通り、下記のコマンドで壊れたシンボリックリンクを削除します。
brew cleanup
今回はこれで無事にエラーがなくなりました。
$ brew doctor Your system is ready to brew.念のためこまめにHomebrewはアップデートしておきましょう。
$ brew update(参考にさせて頂いたサイト様) brew doctorのwarningを解決する
categories
- WordPress(61)
- JavaScript(49)
- Vue.js(48)
- CSS(46)
- jQuery(34)
- Nuxt.js(22)
- Sass(21)
- Gulp(17)
- webpack(16)
- PHP(14)
- HTML(14)
- GSAP(11)
- React(10)
- Vite(9)
- Pug(9)
- Laravel(8)
- Cordova(8)
- Linux(7)
- Next.js(6)
- Apache(5)
- Shopify(4)
- REST API(4)
- Node.js(4)
- Smarty(3)
- Git(3)
- JSON(3)
- その他プログラミング(3)
- Google Apps API(3)
- Bootstrap(3)
- 環境構築・システム(3)
- TypeScript(2)
- EJS(2)
- RMS(2)
- Docker(2)
- Instagram API(2)
- Excel VBA(2)
- SVG(1)
- Dart(1)
- ECカートASP(1)
- Markdown(1)
- AMP(1)
- Nginx(1)
- XML(1)
- shellscript(1)
- Ruby(1)
- MySQL(1)