I’m trying to run rstudio-server on CentOS with the following flake.nix
{
description = "shell flake for VSCode and RStudio";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/4329d79dbab9f9ae6654c59ac428b8935eb7f7c5";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, nixgl }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
with pkgs; with rPackages;
let
rpackage_list = [
ggplot2
];
customRStudioServer = rstudioServerWrapper.override { packages =
rpackage_list;
};
in {
packages.rstudio-server = customRStudioServer;
devShell = mkShell {
nativeBuildInputs = [ bashInteractive ]; # pkgs.bashInteractive
buildInputs =
[
customRStudioServer
];
};
});
}
When I run rserver --config-file myrserver.conf
, The following error occurs.
/nix/store/rsf4q39glsn4rfcvlqjiiw27pl6pwz46-RStudio-1.4.1717/bin/rsession: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
If I do
ldd /nix/store/rsf4q39glsn4rfcvlqjiiw27pl6pwz46-RStudio-1.4.1717/bin/rsession
There is indeed no libgfortran.so.3. Only libgfrotran.so.5 exists as follows.
libgfortran.so.5 => /nix/store/1ghxrdlh0c5z6kgck5ciwymxphnw8j17-gfortran-9.3.0-lib/lib/libgfortran.so.5 (0x00007feee0f9e000)
How can I fix this? Do I have to add libgfortran.so.3
? It seems that gfortran.lib.cc
contains only libgfortran.so.5
. How can I solve this issue?