Rstudio failing to launch

Hello,

As of today, I am unable to launch rstudio. I get the error

❯ rstudio
[10077:0706/092223.868431:ERROR:ui/gl/init/gl_factory.cc:103] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[10077:0706/092223.869340:ERROR:components/viz/service/main/viz_main_impl.cc:183] Exiting GPU process due to errors during initialization
/bin/sh: line 1: /usr/bin/which: No such file or directory
Segmentation fault (core dumped)

when using this flake

{
  description = "A basic flake with a shell for R";
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  inputs.systems.url = "github:nix-systems/default";
  inputs.flake-utils = {
    url = "github:numtide/flake-utils";
    inputs.systems.follows = "systems";
  };

  outputs =
    { nixpkgs, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
      {
        devShells.default = pkgs.mkShell {
          nativeBuildInputs = [ pkgs.bashInteractive ];
          buildInputs = with pkgs; [
            R
            quarto
            chromium
            pandoc
            texlive.combined.scheme-full
            rstudio
            (with rPackages; [
              quarto
              pagedown
              tidyverse
              pryr
              ropenblas
              gt
              janitor
              lobstr
              memoise
              DiagrammeR
              rio
              feather
              WDI
              #png
              #palmerpenguins
              styler
              profvis
              microbenchmark
              benchmarkme
              Rcpp
              swirl
              bookdown
            ])
          ];
        };
      }
    );
}

Any help would be appreciated, thank you.

I guess you’re starting it from the default devShell?
What happens if you throw which in the list of packages as well?
Seems like something is missing it.

I think it has something to do with the recent plasma upgrade. I rolled back to Saturday’s nixpkgs and it works again.

It’s worked fine until today, so why would the flake be suddenly invalid? I use direnv, so I enter the devshell when I enter the directory, and rstudio is not installed system-wide.

Indeed it was solved after a subsequent upgrade. Sorry I forgot to come and close this.

I got the same error today? (unstable branch)

rstudio
/bin/sh: line 1: /usr/bin/which: No such file or directory
zsh: segmentation fault (core dumped) rstudio

rstudio doesn’t build on the current master as soci is broken. Maybe you could provide more details as to how you’re building rstudio?

FWIW, I’m using it with a flake linked to 25.05 and it works fine, but it does throw some ugly errors to the console:

[291953:1007/213616.007018:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[291953:1007/213616.008614:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
/bin/sh: line 1: /usr/bin/which: No such file or directory
[292005:1007/213616.302682:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[292005:1007/213616.303732:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
(electron) 'webContents.clearHistory' is deprecated and will be removed. Please use 'webContents.navigationHistory.clear' instead.

Yes. Following from this Tracking: Build Failures with Cmake 4 · Issue #445447 · NixOS/nixpkgs · GitHub, i build soci cmakeFlags = (old.cmakeFlags or ) ++ [
“-DCMAKE_POLICY_VERSION_MINIMUM=3.10”
];, with this flag. Maybe the error is associated with this

hmm actually with 3.10 as minimum it works again!! though still with some weird output ❯ rstudio
/bin/sh: line 1: /usr/bin/which: No such file or directory
[28552:1008/065342.291017:ERROR:ui/gl/init/gl_factory.cc:103] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[28552:1008/065342.292501:ERROR:components/viz/service/main/viz_main_impl.cc:184] Exiting GPU process due to errors during initialization

I merged soci: 4.0.2 -> 4.1.2 by kyehn · Pull Request #446217 · NixOS/nixpkgs · GitHub this morning, fixing soci. The segfault is potentially related to the old soci version. There’s still a invocation to /usr/bin/which that I’ll try and fix, but rstudio should be functional anyway.

3 Likes