OSX通过brew为python3安装vim

时间:2018-01-10 06:20:26

标签: python vim homebrew

我想通过brew为python3安装vim,但它总是失败。 下面是日志:

LiuJustins-MacBook-Pro:~ justin$ brew install vim --without-python --with-python3
==> Downloading https://github.com/vim/vim/archive/v8.0.1400.tar.gz
Already downloaded: /Users/justin/Library/Caches/Homebrew/vim-8.0.1400.tar.gz
==> ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/8.0.1400_4/share
==> make
Last 15 lines from /Users/justin/Library/Logs/Homebrew/vim/02.make:
CF_EXPORT const CFCalendarIdentifier kCFISO8601Calendar API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
                                                       ^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h:197:63: error: expected ';' after top level declarator
CF_EXPORT const CFCalendarIdentifier kCFIslamicTabularCalendar API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
                                                              ^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h:198:65: error: expected ';' after top level declarator
CF_EXPORT const CFCalendarIdentifier kCFIslamicUmmAlQuraCalendar API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
                                                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [objects/os_mac_conv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
20 errors generated.
make[1]: *** [objects/os_macosx.o] Error 1
make: *** [first] Error 2

请阅读:https://docs.brew.sh/Troubleshooting.html

Error: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.

1 个答案:

答案 0 :(得分:-2)

解决方案:从https://developer.apple.com/download/more/手动下载安装包(" Xcode.dwg和#34的命令行工具;),然后重新运行命令" brew install vim --without-python - -with-python3&#34 ;.现在它有效。