ubuntu - 安装spf13-vim

发布时间 2023-05-07 19:07:16作者: wwcg2235

下载sh脚本时出错

master@master:~/git$ curl https://j.mp/spf13-vim3 -L > spf13-vim.sh && sh spf13-vim.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   142  100   142    0     0    223      0 --:--:-- --:--:-- --:--:--   223
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:22 --:--:--     0
curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 21027 ms: Connection refused

访问:https://www.ipaddress.com/site/raw.githubusercontent.com
拉到最后的FAQ,有ip地址:

What is raw.githubusercontent.com IP address?
raw.githubusercontent.com resolves to 4 IPv4 addresses and 4 IPv6 addresses:

185.199.108.133			//任意选择一个
185.199.109.133
185.199.110.133
185.199.111.133
2606:50c0:8000::154		//任意选择一个
2606:50c0:8001::154
2606:50c0:8002::154
2606:50c0:8003::154

编辑hosts,添加主机地址:

# vim /etc/hosts
185.199.108.133 raw.githubusercontent.com
2606:50c0:8000::154 raw.githubusercontent.com

执行脚本时出错

master@master:~/git$ sh spf13-vim.sh 
Trying to update spf13-vim
Cloning into '/home/master/.spf13-vim-3'...
fatal: unable to access 'https://github.com/spf13/spf13-vim.git/': Failed to connect to github.com port 443 after 21031 ms: Connection refused
[✔] Setting up vim symlinks.
Trying to update vundle
Cloning into '/home/master/.vim/bundle/vundle'...
remote: Enumerating objects: 3140, done.
remote: Total 3140 (delta 0), reused 0 (delta 0), pack-reused 3140
Receiving objects: 100% (3140/3140), 935.40 KiB | 75.00 KiB/s, done.
Resolving deltas: 100% (1106/1106), done.
[✔] Successfully cloned vundle.
E282: Cannot read from "/home/master/.spf13-vim-3/.vimrc.bundles.default"
Press ENTER or type command to continue

spf13-vim.git没有拉下来,目录是空的,手动拉取,

master@master:~$ git clone https://github.com/spf13/spf13-vim ~/.spf13-vim-3
Cloning into '/home/master/.spf13-vim-3'...
remote: Enumerating objects: 3360, done.
remote: Total 3360 (delta 0), reused 0 (delta 0), pack-reused 3360
Receiving objects: 100% (3360/3360), 3.00 MiB | 2.98 MiB/s, done.
Resolving deltas: 100% (1608/1608), done.

spf13-vim因为国内网络的原因,它的插件基本装不上。