Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r-language-server install fails on wsl: "mv: ERROR: moving to final location failed" with r package xml2 dependency #338

Open
2 tasks done
Arethusag opened this issue Dec 9, 2023 · 1 comment

Comments

@Arethusag
Copy link

Problem description

the r-lanuage-server fails to install in ubuntu 22.04 WSL

The error message comes from installing the xml2 r package:
mv: cannot move '[$HOME]/.local/share/nvim/mason/staging/r-languageserver/build/00LOCK-xml2/00new/xml2' to '[$HOME]/.local/share/nvim/mason/staging/r-languageserver/build/xml2': Permission denied
ERROR: moving to final location failed

this appears to be an issue specifically with how lock foldershandle permissions on WSL. If the dependency package is installed with install.packages("xml2", INSTALL_OPTS = '--no-lock') this will fix the problem.

Why do you think this is an issue with mason-lspconfig.nvim?

This is an issue that was brought up on the xml2 repo

r-lib/xml2#361

the fix is to use this modified command. it appears to be a problem only affecting WSL, since the workaround is provided it makes sense to incorporate this into the Mason install command,

Neovim version (>= 0.7)

NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info

Operating system/version

Ubuntu 22.04 LTS WSL

I've manually reviewed the Nvim LPS client log (:LspLog) to find potential errors

  • Yes

I've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig

  • Yes

Affected language servers

r-language-server

Steps to reproduce

try installing r-language server on ubuntu wsl 22.04

Actual behavior

r-language-server fails to install

Expected behavior

r-language-server install succeeds

LspInfo

N/A

LspLog

No response

Healthcheck

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.8.3
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2023-12-09-chummy-lumber` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21.2 built on linux-gnu.`
- OK curl: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16`
- OK gzip: `gzip 1.10`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING cargo: not available
  - ADVICE:
    - spawn: cargo failed with exit code - and signal -. cargo is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING java: not available
  - ADVICE:
    - spawn: java failed with exit code - and signal -. java is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK node: `v18.19.0`
- OK Go: `go version go1.21.5 linux/amd64`
- OK python: `Python 3.10.12`
- OK npm: `10.2.5`
- OK luarocks: `/usr/bin/luarocks 3.8.0`
- OK pip: `pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 1. Remaining: 4999. Limit: 5000. Reset: Fri Dec  8 22:50:41 2023.

Screenshots or recordings

No response

@yuanj82
Copy link

yuanj82 commented Dec 18, 2023

I have the same question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants