Today, when installing Youcompleteme on Macvim, I ran into an error running vim crash. It's been solved for a long time!
First, the process of installing the Macvim
Install Xcode and command line tools$ Xcode-Select -install Install " $ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install) " Install installInstall install Macvim
Then edit the. vimrc
Set nocompatible"Be improved, requiredFileType off"Required "set the runtime path to include Vundle and initializeSet rtp+=~/.vim/bundle/vundle.vimcall vundle#begin ()"Alternatively, pass a path where vundle should install plugins"Call vundle#begin (' ~/some/path/here ') "Let Vundle manage Vundle, requiredPlugin'Gmarik/vundle.vim'Plugin'altercation/vim-colors-solarized'Plugin'Lokaltog/powerline', {'RTP':'powerline/bindings/vim/'}plugin'Kien/ctrlp.vim'Plugin'scrooloose/syntastic'Plugin'Valloric/youcompleteme' "All of your Plugins must is added before the following lineCall Vundle#end ()"RequiredFileType plugin indent on"Required
Running commands in vim
: Bundleinstall
Enter the directory when finished
CD ~/.vim/bundle/youcompleteme. /Install. SH --clang-completer
When the compilation is complete, the run Vim result error.
6
Checked a lap found, plus a parameter to work properly
$ dyld_force_flat_namespace=1 vim
But after all it's not a way to finally see the solution to the problem on GitHub on the issue page:
unlink python
Still invalid after running!!!! Collapse!!!
and keep looking.
$ otool-l/usr/local/cellar/macvim/7.4grep -i python /system/library/frameworks/ python.framework/versions/2.72.7. 0 2.7. 6)
and the default Python on my system is 2.7.9, and the path is/library/frameworks/python.framework/versions/2.7/python!
OK to find the problem, the task now is to adjust the two Python versions to be consistent!!!!
How to do it? Google to find ways to put all the operations together to everyone:
sudo RM-r/system/library/frameworks/python.framework/versions/2.7sudo MV/library/frameworks/python.framework/versions/2.7/system/library/frameworks/python.framework/Versionssudo Chown-R root:wheel/system/library/frameworks/python.framework/versions/2.7sudo RM/system/library/frameworks/python.framework/versions/ Currentsudo LN-s/system/library/frameworks/python.framework/versions/2.7/system/library/frameworks/python.framework/versions/ Currentsudo RM/usr/bin/Pydocsudo RM/usr/bin/pythonsudo RM/usr/bin/pythonwsudo RM/usr/bin/python-Configsudo LN-s/system/library/frameworks/python.framework/versions/2.7/bin/pydoc/usr/bin/Pydocsudo LN-s/system/library/frameworks/python.framework/versions/2.7/bin/python/usr/bin/pythonsudo LN-s/system/library/frameworks/python.framework/versions/2.7/bin/pythonw/usr/bin/pythonwsudo LN-s/system/library/frameworks/python.framework/versions/2.7/bin/python-config/usr/bin/python-config
Children's shoes, which need to be explained in detail, can be viewed in this document.
After executing this shell, you need to edit ~/.bash_profile to point the system's default Python path to the/system/library folder
for 2.7 in . Bash_profile.pysavepath="/system/library/frameworks/ Python.framework/versions/2.7/bin:${path}"export PATH
After you change the Python version, the execution of vim no longer has a segment error.
Reference documents:
1. GitHub issue#8
2. Installing-homebrew-macvim-with-youcompleteme-on-yosemite
3. installing/updating Python on OS X
Install Macvim and youcompleteme on Mac Yosemite