Search code examples
pathwarningsconfighomebrewmamp

Brew doctor warnings after installing MAMP


brew doctor gives out warnings after I installed MAMP:

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:

    /Applications/MAMP/Library/bin/curl-config
    /Applications/MAMP/Library/bin/freetype-config
    /Applications/MAMP/Library/bin/libmcrypt-config
    /Applications/MAMP/Library/bin/libpng-config
    /Applications/MAMP/Library/bin/libpng15-config
    /Applications/MAMP/Library/bin/sablot-config
    /Applications/MAMP/Library/bin/xml2-config
    /Applications/MAMP/Library/bin/xslt-config
    /Applications/MAMP/Library/bin/yaz-config

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:
    /Applications/MAMP/Library/bin/

echo $PATH is:

/usr/local/bin:/usr/local/bin:/usr/local/sbin:~/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/mysql/bin:/Applications/MAMP/Library/bin/

My ~/.bashrc file is blank, and my ~/.bash_profile looks like this:

export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"

# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"

# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc

# virtualenv should use Distribute instead of legacy setuptools
export VIRTUALENV_DISTRIBUTE=true
# Centralized location for new virtual environments
export PIP_VIRTUALENV_BASE=$HOME/.virtualenvs

# pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache

I don't see "/Applications/MAMP/Library/bin/" in my ~/.bash_profile but echo $PATH has it at the end. Is removing "/Applications/MAMP/Library/bin/" from $PATH going to get rid of the brew doctor warnings? How do I remove it and is it going to cause problems to my MAMP or local host?

Thanks!


Solution

  • I checked my .bash_profile with nano ~/.bash_profile and found that I had the path in there that I needed to change:

    # used for Drupal config https://www.bramvandenbulcke.be/en/article/installing-drush-mamp
    export PATH=/Applications/MAMP/bin/php/php5.6.32/bin:$PATH
    export PATH="$HOME/.composer/vendor/bin:$PATH"
    export PATH=/Applications/MAMP/Library/bin/:$PATH
    

    Last line on there was all I changed, took off the last / ad I now get a clean brew doctor report.

    So for the sake of completeness here's my .bash_profile

    # used for Drupal config 
    https://www.bramvandenbulcke.be/en/article/installing-drush-mamp
    export PATH=/Applications/MAMP/bin/php/php5.6.32/bin:$PATH
    export PATH="$HOME/.composer/vendor/bin:$PATH"
    export PATH=/Applications/MAMP/Library/bin:$PATH