mason-org / mason-org/r-languageserver

Mason fails to install `r-languageserver` due to `bspm` conflict on Ubuntu

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.