Required packages for building YouCompleteMe for Vim on Fedora 21

Posted on In QA

YouCompleteMe for Vim on Fedora 21 reports this error:

[zma@laptop:~/.vim/bundle/YouCompleteMe]$ ./install.sh 
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring incomplete, errors occurred!
See also "/tmp/ycm_build.22CI4l/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 177, in <module>
    Main()
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 172, in Main
    BuildYcmdLibs( GetCmakeArgs( args ) )
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 145, in BuildYcmdLibs
    sh.cmake( *full_cmake_args, _out = sys.stdout )
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py", line 1021, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py", line 486, in __init__
    self.wait()
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py", line 500, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/sh/sh.py", line 516, in handle_command_exit_code
    raise exc(self.ran, self.process.stdout, self.process.stderr)
sh.ErrorReturnCode_1: 

  RAN: '/usr/bin/cmake -G Unix Makefiles /home/zma/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp'

  STDOUT:


  STDERR:
Your C++ compiler supports C++11, compiling in that mode.
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
  Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
  (Required is at least version "2.6")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindPythonLibs.cmake:201 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  BoostParts/CMakeLists.txt:30 (find_package)

Which package is missing here? python-libs is installed:

$ rpm -qa | grep python-libs
python-libs-2.7.8-7.fc21.i686
python-libs-2.7.8-7.fc21.x86_64

The message is a little bit misleading here for the Fedora environment.

What you need is the python-devel package here. You can install it by

# yum install python-devel

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *