vim 安装完全攻略
- 下载fedora最新的vim版本7.4
- 下载vim-minimal-7.4.769-3.fc23.x86_64.rpm
- rpm -i 对应的rpm包
-
123error: Failed dependencies:libc.so.6(GLIBC_2.14)(64bit) is needed by vim-minimal-2:7.4.769-3.fc23.x86_64libc.so.6(GLIBC_2.15)(64bit) is needed by vim-minimal-2:7.4.769-3.fc23.x86_64
-
- 使用 strings /lib64/libc.so.6 |grep GLIBC查看本机支持的glibc版本
- 到gnu下载最新的glibc版本,可以到ftp://ftp.gnu.org/gnu/software 下载对应的软件
- 安装glibc
- 本人更新的版本 2.22版本
-
12345configure: error: you must configure in a separate build directoryconfigure要在一个单独的目录里进行mkdir ~/forconfigurecd ~/forconfigure/path/to/glibc-X.X/confifure
- 查看INSTALL文件中的Recommended Tools for Compilation 下所有的需要的软件,并保证安装了其对应的或者最近的版本,可以通过先查看本机对应软件的版本,如果满足,则不需要重新安装,如果比所需要的版本旧,则需要下载并安装新的版本
- 经过检查我的以下软件不符合要求
- gcc
- 本人更新5.2的版本
- configure
- gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0
- 安装GMP
- 本人更新6.0
- configure
- make
- make install
- make check
- 安装MPFR
- 本人更新3.1.3
- configure
- make
- make install
- make check
- 安装MPC
- 本人更行1.0.3版本
- configure
- make
- make install
- make check
- 安装GMP
- gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0
- 修复完成后重新configure
-
1configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
- 查看,如果是64位系统 configure 后面跟 –disable-multilib
-
- configure –disable-multilib
- make参考:http://blog.csdn.net/testcs_dn/article/details/45437149
-
- 我的gmp, mpfr, mpc都是使用默认参数安装的,没指定任何参数
- ./configure
- make
- make install
- 所以直接使用下面的命令设置环境变量就可以了:
-
1export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
- 如果安装时指定了安装目录,使用类似下面的命令:
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gcc-4.6.3/mpc-0.9/mpc_install/lib:/opt/gcc-4.6.3/gmp-5.0.4/gmp_install/lib:/opt/gcc-4.6.3/mpfr-3.1.0/mpfr_inst
1configure: error: cannot compute suffix of object files: cannot compile
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gcc-4.6.3/mpc-0.9/mpc_install/lib:/opt/gcc-4.6.3/gmp-5.0.4/gmp_install/lib:/opt/gcc-4.6.3/mpfr-3.1.0/mpfr_inst
-
- 重新make
- 等待的时间可能会很长,本人时间为2个小时
- make install
- make check
- 出现
-
123456789make[1]: Entering directory `/root/Desktop/glibc_to_install/gcc-5.2.0'make[2]: Entering directory `/root/Desktop/glibc_to_install/gcc-5.2.0/host-x86_64-unknown-linux-gnu/fixincludes'autogen -T ../.././fixincludes/check.tpl ../.././fixincludes/inclhack.defmake[2]: autogen: Command not foundmake[2]: *** [check] Error 127make[2]: Leaving directory `/root/Desktop/glibc_to_install/gcc-5.2.0/host-x86_64-unknown-linux-gnu/fixincludes'make[1]: *** [check-fixincludes] Error 2make[1]: Leaving directory `/root/Desktop/glibc_to_install/gcc-5.2.0'make: *** [do-check] Error 2
- 需要安装autogen
- 选择5.11.8版本
- ./configure
- configure: error: Cannot find libguile. libguile is required.
- 安装guile-lib- 直接使用了yum 安装
- 重新configure
- make
- make install
- 重新make check 没问题
- binutils
- 安装2.25版本
- ./configure
- make
- make isntall
- 重新回到glibc的configure
- 使用configure –prefix=/usr
- make
- make install
- make check
- 下载vim.org上的最新版本
-
12345wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2tar xf vim-7.4.tar.bz2./configure --enable-luainterp --enable-gui=no \--without-x --enable-multibyte --prefix=/usrmake && make install
- 对于源码编译的vim 卸载时 可以使用
-
1234./configure --enable-luainterp --enable-gui=no \--without-x --enable-multibyte --prefix=/usrmakemake uninstall
-
- 如果安装完成后bash找不到vim
- 先env | grep -i PATH
- 查看路径是否正确
- 之后type vim
- 查看vim对应的hash
- hash vim
- 重新生成vim的hash 保证bash可以找到
- 之后type vim 看看是否正确
-

浙公网安备 33010602011771号