非root用户 如何将cscope安装到指定目录,vim74安装

随着Linux的普及,使用Linux进行软件开发的人也越来越多。而大多数公司都采用这种方式:提供一台高性能的中央服务器做为开发编译服务器,每个人登录这台服务器进行开发编译。在这种情况下,用户通常没有root权限,怎么安装应用程序呢? 

以安装cscope为例。 

解决./configure permission denied 没有权限问题 

首先现在安装包,解压 

cd cscope** 

1.添加执行权限  chmod +x ./configure
2.更改用户安装目录 ./configure --prefix=$HOME 

make 

make install 

若出现其他错误,参见readme文件 
3)遇到的问题
我的安装使用没有上面说的那么顺。使用的时候,我执行
:cs add cscope.out
显示:
E319: Sorry, the command is not available in this version.
最后出的原因是编译的时候没有加入cscope模块。
执行vim命令查看:
1    $ vim --version | grepcscope
2     ... -cscope ...
cscope前是减号,说明当前vim里没有加入这个模块。
找到vim的源码包,进入源码路译。
1    $ ./configure --help | grepcscope
2      --enable-cscope    Include cscope interface
说明如果要在vim中使用cscope,就得在配置的时候加入--enable-cscope参数。如下:
1    $ ./configure --enable-cscope &&make
编译完了之后,先别急着安装,检查一下新编译的vim可执行文件是否具有cscope功能。
1    $ .src/vim --version | grepcscope
2    ... +cscope ...




vim74安装

1. 下载 vim-7.4.tar.bz2

2. 解压 tar -jxvf vim-7.4.tar.bz2

3. ./configure

4. make

5. 修改prefix 

vim src/auto/config.mk

找到prefix变量,修改为你要安装的目录

6. make install 完成安装

7. 配置vim别名为安装目录下的vim文件的绝对路径

原文地址:https://www.cnblogs.com/zendu/p/4991068.html