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: The following directories do not exist:
/usr/local/sbin
You should create these directories and change their ownership to your account.
sudo mkdir -p /usr/local/sbin
sudo chown -R $(whoami) /usr/local/sbin
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:
/Users/xuzhengfu/anaconda3/bin/icu-config
/Users/xuzhengfu/anaconda3/bin/krb5-config
/Users/xuzhengfu/anaconda3/bin/freetype-config
/Users/xuzhengfu/anaconda3/bin/xslt-config
/Users/xuzhengfu/anaconda3/bin/libpng16-config
/Users/xuzhengfu/anaconda3/bin/python3.7-config
/Users/xuzhengfu/anaconda3/bin/libpng-config
/Users/xuzhengfu/anaconda3/bin/xml2-config
/Users/xuzhengfu/anaconda3/bin/python3.7m-config
/Users/xuzhengfu/anaconda3/bin/python3-config
/Users/xuzhengfu/anaconda3/bin/curl-config
/Users/xuzhengfu/anaconda3/bin/ncursesw6-config
/Users/xuzhengfu/anaconda3/bin/pcre-config
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libnnz11.dylib
/usr/local/lib/libociei.dylib
/usr/local/lib/libocijdbc11.dylib
(base)
Updating Homebrew...
==> Installing dependencies for python: gdbm, openssl@1.1, readline, sqlite and xz
==> Installing python dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1.mojave.bottle.
\######################################################################## 100.0%
==> Pouring gdbm-1.18.1.mojave.bottle.1.tar.gz
🍺 /usr/local/Cellar/gdbm/1.18.1: 20 files, 586.8KB
==> Installing python dependency: openssl@1.1
==> Downloading https://homebrew.bintray.com/bottles/openssl@1.1-1.1.1d.mojave.
==> Downloading from https://akamai.bintray.com/10/104ef018b7bb8fcc49f57e5a6035
\######################################################################## 100.0%
==> Pouring openssl@1.1-1.1.1d.mojave.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl@1.1/certs
and run
/usr/local/opt/openssl@1.1/bin/c_rehash
openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because openssl/libressl is provided by macOS so don't link an incompatible version.
If you need to have openssl@1.1 first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile
For compilers to find openssl@1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
For pkg-config to find openssl@1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/openssl@1.1/1.1.1d: 7,983 files, 17.9MB
==> Installing python dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.1.mojave.bott
==> Downloading from https://akamai.bintray.com/3c/3c754391e9d243835811d128771c
\######################################################################## 100.0%
==> Pouring readline-8.0.1.mojave.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
For compilers to find readline you may need to set:
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"
For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/readline/8.0.1: 48 files, 1.5MB
==> Installing python dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.30.1.mojave.bottl
==> Downloading from https://akamai.bintray.com/5e/5e6fef2d754e0e4009d502c40ad1
\######################################################################## 100.0%
==> Pouring sqlite-3.30.1.mojave.bottle.tar.gz
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.
If you need to have sqlite first in your PATH run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile
For compilers to find sqlite you may need to set:
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/sqlite/include"
For pkg-config to find sqlite you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/sqlite/3.30.1: 11 files, 3.9MB
==> Installing python dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.4.mojave.bottle.tar
==> Downloading from https://akamai.bintray.com/01/010667293df282c8bceede3bcd36
\######################################################################## 100.0%
==> Pouring xz-5.2.4.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.4: 92 files, 1MB
==> Installing python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.6_1.mojave.bott
==> Downloading from https://akamai.bintray.com/64/643d627c2b4fc03a3286c397d299
\######################################################################## 100.0%
==> Pouring python-3.7.6_1.mojave.bottle.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
(base)
1. 安装 Apple 开发工具包
1.1 执行命令
xcode-select -v
之前已安装
xcode-select
,执行命令xcode-select -v
,显示如下:2. 安装 Homebrew
2.1 执行命令
brew -v
因为之前已安装 Homebrew,执行命令
brew -v
,显示如下:2.2 执行命令
brew update
运行 Homebrew 自更新命令
brew update
,结果等了 2 分钟,无任何反应 (在 1 分钟时,打开了 VPN),于是 control + c,显示如下:2.3 执行命令
brew update
再执行一次
brew update
,等待2分钟,还是无反应。control + c,显示如下:2.4 执行命令
brew doctor
不知道发生了什么,以及接下来该做什么,于是,接着执行了下一个命令
brew doctor
,显示如下:很随意地翻了一会儿原仓库 issues,有类似问题,好像不要紧,具体咋回事还不清楚,不过我要去睡觉了……
2.5 执行命令
brew update
第二天下午,再次执行
brew update
,显示如下:这是更新成功的意思么?不太确定,但好像是的…… 那我可以进行下一步了。
3. 用 brew 安装 python 和 git
3.1 执行命令
git --version
、python --version
之前已安装 git 和 python,执行命令
git --version
,显示如下:执行命令
python --version
,显示如下:既然我已经安装过了,那我就可以进行下一步了。
3.2 执行命令
brew list
以查看已经安装好的这两个软件包以及所有自动安装的依赖包,显示如下:
嗯,看到里面有 git 了,哎,怎么没 python 啊?正好下一个指令是查看 python 版本的,先来试试看……
3.3 执行命令
python3 -v
以查看新安装的 Python 的版本,显示如下:
我草,这什么乱七八糟的,我看到里面有 “anaconda3”,肯定是 anaconda 给弄得,看来我还是得用 brew 装个 python……
3.4 执行命令
brew install python
显示如下:
看到有好多 “Caveats”,查了一下字典,是 “警告” 的意思,而且最后还有 “Error”,这一步肯定有问题。
3.5 执行命令
brew list
再执行命令
brew list
,看看 python 装上没有,结果如下:看到 python 了!所以 Python 及相关依赖已经安装上了,可刚才怎么报错呢?
3.6 执行命令
python3 -v
再执行命令
python3 -v
,查看一下安装上的 Python 的版本。结果和 「未 brew install python」前一样,还是那乱七八糟的一堆。什么原因呢?
猜想:操作步骤与教程一致,除了 homebrew 的安装;尽管能够确定 homebrew 已安装,但 homebrew 的「安装位置」未必相同。故:卸载 homebrew,而后以「教程」提供的安装方式重新安装。
3.7 卸载 homebrew
在 spotlight 里面搜索 “homebrew”,试图查找原 “homebrew” 的安装地址,结果没有出现任何 “homebrew” 的文件夹,这是怎么回事?可是,到 /usr/local/ 目录下 ,却又发现了 homebrew 的文件夹。怎么卸载呢?直接删除这些文件夹吗?
很懵逼……
卸载 homebrew 的操作就此搁置。
3.8 执行命令
python3 -v
再执行命令
python3 -v
试试看。结果还是一样的,还是那乱七八糟的一堆,看着头疼,搞不定了,我得去提 issue 问问……Logging
2020-02-03 21:41:12 搬到 GitHub 上,作格式调整,梳理内容及逻辑 2020-02-01 从 "安装 Homebrew".5 处继续推进任务 2020-01-31 initialize