path – 安装MAMP后酿造医生警告

我安装MAMP后,brew医生发出警告:

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是:

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

我的〜/ .bashrc文件是空白的,我的〜/ .bash_profile看起来像这样:

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

我在〜/ .bash_profile中没有看到“/ Applications / MAMP / Library / bin /”,但echo $PATH最后有.从$PATH删除“/ Applications / MAMP / Library / bin /”是为了摆脱brew医生的警告吗?如何删除它是否会导致我的MAMP或本地主机出现问题?

谢谢!

我用nano~ / .bash_profile检查了我的.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

最后一行就是我改变了所有,取消了最后一个/广告我现在得到一份干净的酿造医生报告.

所以为了完整起见,这是我的.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
相关文章