mason-org / mason-org/r-languageserver
Mason fails to install `r-languageserver` due to `bspm` conflict on Ubuntu
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 10
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I'm not entirely sure I understand the issue, but it seems that Mason fails to install `r-languageserver` because of how the [`bspm`](https://cran4linux.github.io/bspm/) package bridges R and the Ubuntu system package manager. This can interfere with Mason’s installation process, and users should be aware of it.
Installing R packages on Ubuntu/Linux can be tricky due to the interaction between R’s package system and APT (the Advanced Package Tool). To help with this, there’s a [special repository](https://github.com/eddelbuettel/r2u) that provides [Ubuntu binaries](https://cran.r-project.org/bin/linux/ubuntu/#install-r) and a package called [`bspm`](https://cran4linux.github.io/bspm/), which allows `install.packages()` to use APT behind the scenes.
The problem is that a default R installation in Ubuntu automatically loads `bspm` via the system-wide `.Rprofile.site` file (usually located at `/etc/R/Rprofile.site`), and this can conflict with how Mason installs LSPs.
**Temporary fix**:
Open `/etc/R/Rprofile.site` as Administrator and comment out the `bspm` calls before running `:MasonInstall r-languageserver` in Neovim. For example:
```r
# suppressMessages(bspm::enable())
# options(bspm.version.check=FALSE)
```
I hope this helps.
Thank you for this great plugin!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing `:MasonInstall r-languageserver` on Ubuntu with the default `/etc/R/Rprofile.site`, then compare the result after commenting out the documented `bspm` calls. The issue does not define a desired code change; completion would require an agreed fix or documentation update for this conflict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim, r
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100