nvim-lsp-installer icon indicating copy to clipboard operation
nvim-lsp-installer copied to clipboard

Can't update properly

Open bryant-the-coder opened this issue 3 years ago • 13 comments

image This has happened at least 2 times in 2 weeks. Any way to fix this?

OS: Windows 10 NVIM v0.7.0-dev+1400-g233014f92 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compiled by runneradmin@fv-az158-709

bryant-the-coder avatar Apr 12 '22 09:04 bryant-the-coder

Hey! I rarely use Windows and when I do I've never ran into this. I'd imagine it's because some running process is using a directory that we want to replace with a fresh installation. In this case it's most likely because the sumneko_lua server is running in the background.

Next time it happens, try stopping the server if it's running (:LspStop), and if that doesn't work try restarting the neovim instance (& make sure there are no others running)

williamboman avatar Apr 12 '22 11:04 williamboman

I will try. I will report if there are anymore issues. Won't be closing this issue just yet :D

bryant-the-coder avatar Apr 12 '22 21:04 bryant-the-coder

I'm running into this as well with the server not running (no files opened after starting nvim, :LspStop run before attempting install)

 ◍ rust_analyzer (failed)
        Fetching latest release version from GitHub API...
        
        7-Zip 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26
        
        Scanning the drive for archives:
        1 file, 8654897 bytes (8453 KiB)
        
        Extracting archive: rust-analyzer.exe.gz
        --
        Path = rust-analyzer.exe.gz
        Type = gzip
        Headers Size = 10
        
        Everything is Ok
        
        Size:       26672128
        Compressed: 8654897
        Deleting "C:\\Users\\[user]\AppData\\Local\\nvim-data\\lsp_servers\\rust_analyzer.tmp\\rust-analyzer.exe.gz"
        Deleting "C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust_analyzer.tmp\\rust-analyzer.exe.gz"
        Failed to delete "C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust_analyzer.tmp\\rust-analyzer.exe.gz".
        ...art\nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:251: Failed to promote the temporary installation directory "C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust_analyzer.tmp".

OS: Windows 10 NVIM v0.7.0 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compiled by runneradmin@fv-az320-113

ghost avatar Apr 15 '22 15:04 ghost

Log:

[INFO  4/15/2022 11:09:40 AM] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:682: Starting install server_name="rust_analyzer", requested_version=""
[ERROR 4/15/2022 11:09:40 AM] ...rt\nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[ERROR 4/15/2022 11:10:01 AM] ...art\nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:176: Failed to rename. path="C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust_analyzer.tmp" new_path="C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust" error="...r\\start\\nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:36: EACCES: permission denied: C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust_analyzer.tmp -> C:\\Users\\[user]\\AppData\\Local\\nvim-data\\lsp_servers\\rust"
[ERROR 4/15/2022 11:10:01 AM] ...art\nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:267: Server installation failed, server_name="rust_analyzer", error='...art\\nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:251: Failed to promote the temporary installation directory "C:\\\\Users\\\\[user]\\\\AppData\\\\Local\\\\nvim-data\\\\lsp_servers\\\\rust_analyzer.tmp".'
[INFO  4/15/2022 11:10:01 AM] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:701: Installation completed server_name="rust_analyzer", success=false

ghost avatar Apr 15 '22 16:04 ghost

Same problem here. I am unable to install rust-analyzer using the lsp installer i get an unpacking error as follows

        Downloading file "https://github.com/rust-lang/rust-analyzer/releases/download/2022-06-13/rust-analyzer-x86_64-pc-windows-msvc.gz"...
        ...taller/lua/nvim-lsp-installer/core/managers/std/init.lua:102: Unable to unpack rust-analyzer.exe.gz.

Xenomorph07 avatar Jun 16 '22 06:06 Xenomorph07

@Vedant-Matanhelia Make sure you meet the minimum requirements listed in the README. You're most likely missing a tool that unpacks archives (winzip, 7zip, etc.)

williamboman avatar Jun 16 '22 10:06 williamboman

@Vedant-Matanhelia Make sure you meet the minimum requirements listed in the README. You're most likely missing a tool that unpacks archives (winzip, 7zip, etc.)

I have both winzip and 7zip installed on Windows 10 and I'm experiencing the same error.

Error

  Pending servers (1) 
    ⟳ rust_analyzer (failed)
        Downloading file "https://github.com/rust-lang/rust-analyzer/releases/download/2022-08-15/rust-analyzer-x86_64-pc-windows-msvc.gz"...
        ...taller/lua/nvim-lsp-installer/core/managers/std/init.lua:102: Unable to unpack rust-analyzer.exe.gz.

Installed Tools

PS C:\Users\RFID\.cargo\bin> zip
Copyright (c) 1990-2009 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.1b BETA (Apr 9th 2009). Usage:
[...]

7zip 22.01(x64)

WinZip 26.0

JoelMon avatar Aug 16 '22 18:08 JoelMon

Hi! Run the terminal as an administrator(I am use PowerShell). Second check that you have zip and 7zip installed Force update if needed, something like choco install zip --foce and choco install 7zip --foce I had the same error as you, that helped. Upd: zip v3.0, 7zip v22.1 NVIM v0.7.2 LuaJIT 2.1.0-beta3

mh3th avatar Aug 22 '22 19:08 mh3th

Hi! Run the terminal as an administrator(I am use PowerShell). Second check that you have zip and 7zip installed Force update if needed, something like choco install zip --foce and choco install 7zip --foce I had the same error as you, that helped. Upd: zip v3.0, 7zip v22.1 NVIM v0.7.2 LuaJIT 2.1.0-beta3

Thank you! that solved for me

erlonbie avatar Aug 28 '22 16:08 erlonbie

I don't have choco set up on my system and kinda don't want to go through all that... Running as admin didn't seem to help. I'll keep probing around when I have free time.

JoelMon avatar Aug 29 '22 13:08 JoelMon

Did you manage to find a solution? I'm currently facing the same problem. I didn't want to install choco right now either, so I'll also try a little more before going that path.

Rafael-Conde avatar Sep 08 '22 14:09 Rafael-Conde

I managed to solve the problem. I had the unpack problem:

similar to this, that was posted before in this thread:

    ⟳ rust_analyzer (failed)
        Downloading file "https://github.com/rust-lang/rust-analyzer/releases/download/2022-08-15/rust-analyzer-x86_64-pc-windows-msvc.gz"...
        ...taller/lua/nvim-lsp-installer/core/managers/std/init.lua:102: Unable to unpack rust-analyzer.exe.gz.

I solved the problem by just manually adding 7zip to the path enviroment variable, since it apparently isn't added automatically(or I missed this option in the installer).

Rafael-Conde avatar Sep 08 '22 14:09 Rafael-Conde

use mason. it works fine 😏

bryant-the-coder avatar Sep 09 '22 10:09 bryant-the-coder