ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.91k stars 458 forks source link

Installation of LSP server failed #1178

Closed songxingling1 closed 7 months ago

songxingling1 commented 7 months ago

Version confirmation

Following prerequisites

Not a user config issue

Neovim version

NVIM v0.9.5

Operating system/version

Zorin OS 17 x86_64

Terminal name/version

tmux 3.2a

$TERM environment variable

screen-256color

Branch info

main (Default/Latest)

Fetch Preferences

SSH (use_ssh = true)

Affected language servers

clangd,lua_ls

How to reproduce the issue

  1. Installing clangd using APT (Please forgive me for using Debian Linux)
  2. Open NVIM
  3. Pop up error message

Actual behavior

When opening NVIM, you will see [mason lspconfig. nvim] failed to install lua'ls. Installation logs are available in: Mason and: MasonLog pop up and [mason lspconfig. nvim] failed to install lua'ls. Installation logs are available in: Mason and: MasonLog pop up

Expected behavior

Don't pop up these pop ups

Support info

LspInfo: Language client log: /home/songxinglin/.local/state/nvim/lsp.log Detected filetype: notify

0 client(s) attached to this buffer:

Configured servers list: bashls, html, jsonls, pylsp

Mason: Registry installation failed with the following error: GitHubRegistrySource(repo=mason-org/mason-registry) failed to install: Failed to fetch latest registry version from GitHub API.

Logs

No response

Additional information

I live in China and may not be able to access GitHub

CharlesChiuGit commented 7 months ago

plz make sure u can access github via shell.

songxingling1 commented 7 months ago

This is the result of my ping github

PING github.com (20.205.243.166) 56(84) bytes of data.
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=1 ttl=111 time=79.1 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=2 ttl=111 time=77.6 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=3 ttl=111 time=77.5 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=4 ttl=111 time=78.3 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=5 ttl=111 time=77.5 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=6 ttl=111 time=77.8 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=7 ttl=111 time=78.5 ms
^C
--- github.com ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6008ms
rtt min/avg/max/mdev = 77.526/78.038/79.098/0.555 ms

There are also api.github.com and raw.githubusercontent.com

PING api.github.com (20.205.243.168) 56(84) bytes of data.
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=1 ttl=111 time=74.9 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=2 ttl=111 time=75.6 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=3 ttl=111 time=74.0 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=4 ttl=111 time=74.0 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=5 ttl=111 time=73.6 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=6 ttl=111 time=73.8 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=7 ttl=111 time=73.6 ms
64 bytes from 20.205.243.168 (20.205.243.168): icmp_seq=8 ttl=111 time=73.7 ms
^C
--- api.github.com ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7011ms
rtt min/avg/max/mdev = 73.560/74.149/75.630/0.680 ms
PING raw.githubusercontent.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.036 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.041 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.038 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.038 ms
^C
--- raw.githubusercontent.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4086ms
rtt min/avg/max/mdev = 0.031/0.036/0.041/0.003 ms

I suspect that raw.githuusercontent.com has been contaminated by my DNS server because ping raw.githuusercontent.com accessed localhost

ayamir commented 7 months ago

https://github.com/maxiaof/github-hosts maybe help.

songxingling1 commented 7 months ago

But after I copied DNS into /etc/hosts, it still didn't work, but the error came out even later.

CharlesChiuGit commented 7 months ago

so have u tried :MasonInstall --force stated in the log?

songxingling1 commented 7 months ago

After execution, there doesn't seem to be anything particularly special.

image

CharlesChiuGit commented 7 months ago

since there's a lockfile, i think the easiest way to fix it is to reboot the machine looool

songxingling1 commented 7 months ago

He said the 44470 process is occupying files, but I can't find the 44470 process

CharlesChiuGit commented 7 months ago

again, i still think rebooting it's fairly easy and quick to try.

songxingling1 commented 7 months ago

Now I set wget not to check CA certificates, NVIM installed clangd at a very slow speed. Anyway, it was finally installed. Thank you!