1. 程式人生 > >Linux-使用之vim出現的問題

Linux-使用之vim出現的問題

參考來源: https://stackoverflow.com/questions/47667119/ycm-error-the-ycmd-server-shut-down-restart-wit-the-instructions-in-the-docu //問題2
https://github.com/yangyangwithgnu/use_vim_as_ide/blob/master/README.md#8.4 //問題3
問題2:安裝好vim後開啟vim出現錯誤資訊
錯誤資訊:The ycmd server SHUT DOWN (restart with...the instructions in the documentation
解決步驟:使用:YcmDebugInfo comes back with "Server errored, no debug info from server".
cd ~/.vim/bundle/YouCompleteMe and ran python install.py // 提示ERROR: Unable to find executable 'cmake'. CMake is required to build ycmd
sudo apt install cmake
//以上命令讓系統做了什麼
/* Built target ycm_core
-- The C compiler identification is GNU 7.3.0
-- 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
                          -- Detecting C compile features
                          -- Detecting C compile features - done
                          -- Found PythonLibs: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so (found version "3.6.6") 
                          -- Configuring done
                          -- Generating done
                          -- Build files have been written to: /tmp/regex_build_82orenjb

    問題3:markdown實時顯示出現問題
    vim必須繼承ruby直譯器(原始碼安裝編輯器vim),
    sudo gem intall pygments.rb // 安裝pygments.rb依賴庫
    提示 gem:command not found
    sudo apt-get install ruby // 安裝ruby,以便執行gem命令
    sudo gem install redcarpet // 安裝redcarpet依賴庫
    提示 ERROR: Error installing redcarpet:
    ERROR: Failed to build gem native extension.
    current directory: /var/lib/gems/2.5.0/gems/redcarpet-3.4.0/ext/redcarpet
    /usr/bin/ruby2.5 -r ./siteconf20181111-16728-1ylk41o.rb extconf.rb
    mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
    extconf failed, exit code 1

                  sudo gem update --system // 解決安裝redcarpet依賴庫出現錯誤的問題
             gem install redcarpet --platform=ruby --verbose
                      mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
                      ERROR:  Error installing redcarpet:
                  ERROR: Failed to build gem native extension.
                      Building has failed. See above output for more information on the failure.
                      extconf failed, exit code 
                 sudo apt-get install ruby-dev