set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'valloric/youcompleteme'
call vundle#end()
我输入了
:PluginInstall
,但出现了错误。 2 [2018-09-27 10:47:17] Plugin valloric/youcompleteme | 18 " line enables syntax highlighting by default.
3 [2018-09-27 10:47:17] $ git clone --recursive 'https://github.com/valloric/youcompleteme.git' '/roo| 19 syntax on;
t/.vim/bundle/youcompleteme' | 20 if has("syntax")
4 [2018-09-27 10:47:17] > Cloning into '/root/.vim/bundle/youcompleteme'... | 21 syntax on
5 [2018-09-27 10:47:17] > error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was| 22 endif
non-properly terminated.
然后我进入目录 ~/.vim/bundle
并执行以下命令:
git clone --recursive 'https://github.com/valloric/youcompleteme.git
并且,听好了
Cloning into '~/.vim/bundle/youcompleteme'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 34431 (delta 4), reused 8 (delta 1), pack-reused 34416
Receiving objects: 100% (34431/34431), 32.58 MiB | 2.37 MiB/s, done.
error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
Resolving deltas: 100% (12305/12305), done.
如此处所述,尽管出现错误,插件似乎已经下载完毕。但实际上我找不到youcompleteme
目录。
我也试过
git clone --recursive 'git@github.com:Valloric/YouCompleteMe.git' '~/.vim/bundle/youcompleteme'
并且,听好了
Cloning into '~/.vim/bundle/youcompleteme'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
那么如何解决这个问题呢?
/etc/apt/sources.list
文件中取消注释带有# deb-src...
的行,并运行apt-get update
命令。执行apt-get source git
命令后,目录中有三个文件:git_2.25.1-1ubuntu3.dsc
、git_2.25.1-1ubuntu3.debian.tar.xz
和git_2.25.1.orig.tar.xz
。解压缩.orig.
文件会创建git-2.25.1/
目录。然后在git-2.25.1/
内部解压缩-1ubuntu3.
文件。从那里运行其余的命令。 - minghuasudo dpkg -i ../git_2.20.1-2+deb10u3_armhf.deb
。 - Stretchdude