-
Notifications
You must be signed in to change notification settings - Fork 16
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
Rstudio on Mac Failure #451
Comments
You can ignore the warnings from the console, the issue here is what’s shown inside the RStudio session. It seems you also have homebrew on this machine, and that homebrew installed some version of ssl, which in turn is causing issues because RStudio (which was installed by Nix) tries to load it. This can unfortunately happen because at runtime, nix shells are not completely isolated from the rest of your machine. So there’s only two, quite radical options:
I’ll also ask in the R for nix matrix channel and see if we can improve the packaging of RStudio to perhaps ignore this kind of things. Maybe that would work |
btw, can you also share your default.nix here? so I can try to reproduce on my mac (which doesn’t have homebrew) |
We might be able to patch rstudio to ignore this kind of thing: to help us debug, could you run:
in a terminal? you should get something like:
then run:
and copy and paste the output here |
dyld[56365]: Library not loaded: /opt/homebrew/opt/openssl@3/lib/libssl.3.dylib |
I have been using Positron on mac but would like this to work for rstudio. |
Could you tell us what It doesn't seem like the If yes, my main hypothesis is the following: you were trying to download rstudio when it wasn't cached yet (unrelated to rstudio), so it rebuilt it on your system. However, since the sandbox is not completely enabled on darwin, your local openssl installation might have leaked in into the build process. |
it's this nixpkgs revision https://github.com/rstats-on-nix/nixpkgs/tree/2025-03-03 it's basically a fork of master at that day, looking at the commit history you'll find the nixos/nixpkgs revision it's based on. It's not flakes but a shell generated by rix. How do you know rstudio wasn't downloaded from the cache.nixos.org ?
I wasn't aware of this, interesting |
Here is my default.nix file
|
I looked at the git history, and yes, this snapshot was taken between two electron changes. This way Hydra (the cache CI) never built it. Should be solved by using a later revision, where rstudio is cached. |
AFAICT NixOS/nixpkgs#384339 will fix the issue permanently. It was only fixed accidentally by upstream: they renamed |
@TomaSajt many thanks for your help ! @jgeller112 could you try with the 2025-03-10? |
Fixed! Thanks for your help! |
I have removed homebrew but still getting the above errors. I am not sure what is going on. I was able to get rstudio running on another mac, but not my home macs. |
I have reinstalled everything. |
did that other mac have hombrew ? did you use the latest available date (2025-03-10)? maybe remove the |
My first guess would be that your If you don't care about having to download some packages again, try garbage-collecting your store. Maybe that fixes it. In any case, NixOS/nixpkgs#384339 is close to being merged. That should fix your problem in theory. Would you be willing to try that branch out? |
It did have homebrew. I try building it again. |
to try the branch, replace |
@TomaSajt and @b-rodrigues that worked! |
That's great news! |
I'll hold off on sharing with collaborators until the merge is complete |
The PR is merged so I assume the latest snapshots will work now. |
I just tried to open a rstudio session within the nix shell and am getting the below error
When a session is open I get something like this:
The text was updated successfully, but these errors were encountered: