本人的操作系统环境centos 6.6在安装vim的YCM插件时出现错误。
vim为自己编译,已添加相应的解释语言支持。
系统自带的python版本为2.6,本人编译添加了2.7以及3.4版本,所以本人的环境中有这三个版本。
进入YCM目录,执行命令安装时,出现的错误如下:
[ 90%] Building CXX object ycm/CMakeFiles/ycm_client_support.dir/Result.cpp.o
Linking CXX shared library /home/xuanyuan/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycm_client_support.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: 错误:ld 返回 1
gmake[3]: * [/home/xuanyuan/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycm_client_support.so] 错误 1
gmake[2]: * [ycm/CMakeFiles/ycm_client_support.dir/all] 错误 2
gmake[1]: * [ycm/CMakeFiles/ycm_support_libs.dir/rule] 错误 2
gmake: * [ycm_support_libs] 错误 2
Traceback (most recent call last):
File "/home/xuanyuan/k-vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 327, in
Main()
File "/home/xuanyuan/k-vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 316, in Main
BuildYcmdLibs( args )
File "/home/xuanyuan/k-vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 261, in BuildYcmdLibs
subprocess.check_call( build_command )
File "/usr/local/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'ycm_support_libs', '--', '-j', '1']' returned non-zero exit status 2
Traceback (most recent call last):
File "./install.py", line 32, in
Main()
File "./install.py", line 21, in Main
subprocess.check_call( [ python_binary, build_file ] + sys.argv[1:] )
File "/usr/local/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python', '/home/xuanyuan/k-vim/bundle/YouCompleteMe/third_party/ycmd/build.py']' returned non-zero exit status 1
求解决办法?