编译安装可以使vim带有更多的特性,比如+Python3
+Python
+clipboard
等等
编译安装
1 2 3
| sudo apt-get remove -y vim vim-runtime gvim -y
sudo apt-get remove -y vim-tiny vim-common vim-gui-common vim-nox
|
1 2 3 4
| sudo apt install libncurses5-dev libgnome2-dev libgnomeui-dev \ libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ python3-dev ruby-dev lua5.1 liblua5.1-dev libperl-dev git
|
1
| git clone https://github.com/vim/vim.git
|
1 2 3 4 5 6 7 8 9 10 11 12 13
| cd vim ./configure --with-features=huge \ --enable-multibyte \ --enable-rubyinterp=yes \ --enable-pythoninterp=yes \ --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \ --enable-python3interp=yes \ --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \ --enable-perlinterp=yes \ --enable-luainterp=yes \ --enable-gui=gtk2 \ --enable-cscope \ --prefix=/usr/local
|
1 2 3
| make sudo make install sudo ldconfig
|
将编译好的包打包成deb
1
| sudo apt-get install checkinstall
|
1 2
| cd vim sudo checkinstall
|
1 2
| The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]:
|
1 2 3 4
| Please write a description for the package. End your description with an empty line or EOF. >> vim 8.1安装包 >>
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| ***************************************** **** Debian package creation selected *** *****************************************
软件包将用下面的值来创建:
0 - Maintainer: [ root@ubuntu ] 1 - Summary: [ Vim 8.1安装包 ] 2 - Name: [ vim ] 3 - Version: [ 20190222 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ vim ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ vim ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
输入一个数字来改变它们,或按回车键继续:
|
- 回车,输入yes,之后等着就行了.此时会自动生成deb包在你的目录下
checkinstall的小技巧
- 在一些需要编译安装的软件中,在你执行完make之后,不用着急make install,此时可以用
checkinstall
打包一个deb包,以备你以后安装,下次安装就可以省去编译的时间