安装依赖:
sudo apt-get install libncurses5-dev
sudo apt-get install build-essential cmake
sudo apt-get install python-dev python3-dev
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev zlib1g-dev
sudo apt-get install autogen
sudo apt-get install libclang-dev
升级CMake(可选):
wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
tar xvf cmake-3.5.2.tar.gz
cdcmake-3.5.2
./bootstrap --prefix=/usr
make
sudo make install
升级GCC到4.9.2(如果你的gcc版本<=4.8):
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz
cd gcc-4.9.2
./configure --prefix=/opt/gcc-4.9.2 --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib
make && make check
sudo make install
这样在/opt目录下就生成gcc4.9.2目录。
删除当前的gcc(可选):
sudo apt-get remove gcc
创建软连接到bin文件夹:
sudo rm /usr/bin/gcc /usr/bin/g++
sudo ln -s /opt/gcc-4.9.2/bin/gcc /usr/bin/gcc
sudo ln -s /opt/gcc-4.9.2/bin/g++ /usr/bin/g++
------------------------------------------------------------------------------------------------------
方法一:
自己编译VIM:
git clone https://github.com/vim/vim.git
cd vim
git pull
配置python支持,否则在
./configure --enable-multibyte --enable-pythoninterp=yes
编译:
cd src
make distclean # if you build Vim before
make
sudo make install
方法二:
sudo add-apt-repository ppa:jonathonf/vim
sudo apt-get update
sudo apt-get install vim-nox-py2
sudo mv /usr/local/bin/vim /usr/local/bin/vim.old
sudo ln -s /usr/bin/vim.nox-py2 /usr/local/bin/vim
配置Vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vi ~/.vimrc