Really dumb sequence of events that I don’t know how to resolve. Something wasn’t working right with my r installation and after multiple attempts at troubleshooting it I decided the smart move was to just remove anything related to R in /usr/lib, /usr/lib64 and /usr/bin using rm -r . This caused pretty much everything regarding R and Rstudio to break, running R from terminal doesn’t work and running rstudio gives me an error message saying it can’t find an R installation.
Can my soul and installation be saved or do I need to reinstall fedora?
If I understand you correctly, you manually purged installation files from the R installation from your system and now you’re surprised it no longer works?
You don’t state this but I assume you have re-installed R from wherever you installed it from already and it STILL doesn’t work?
I am, in fact, as dumb as I sound. Yes I have re-installed it and no it doesn’t work.
I am not really surprised it doesn’t work, while doing the stupid thing I did think I might just break something, but I figured that once I reinstall it everything would come back.
No worries - I sounded a bit harsh but it read as though you’d gone wild with rm and not re-installed anything.
What rationale did you use to select files to remove and perhaps more importantly, did you install this as a snap, flatpak or is there a rpm for it?
I’ve never looked at R, or how it’s made available but the only thing I can see in the repos for it, is a snap named RStudio.
I’m wondering what (else) you might have blown away from /usr/lib and any other file system locations. In theory, removing the package and in-stalling the same package should put back anything that is required but missing.
R is installed from CRAN as an .rpm via dnf, rstudio is installed the same way.
The R folders are all named “R” and rstudio “rstudio” so i just removed those ones specifically after goind into the directories via cd and listing everything to check if they were removed.
Also no worries, you weren’t harsh at all, this is one of the stupidest things I did since switching to linux some years ago xD.
Hmm - I’d kinda expect that a sudo dnf reinstall R Rstudio should pull them both back down and slap them back over the top of whatever is there (or not there, as the case may be).
If it does not (which is sounds is the case), are there any logs or error messages when you run either package from the command line rather than from the application launcher - I’m hoping you get messages like “cannot load /usr/lib/wibble.so.1” which point you directly to the libraries it’s whinging about.
Reinstalled, tried to run R from terminal got the following:
bash: R: command not found...
Did the same for rstudio got:
11632:0323/142158.517941:ERROR:ui/gl/init/gl_factory.cc:102] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=opengl),(gl=egl-angle,angle=opengles),(gl=egl-angle,angle=vulkan),(gl=egl-angle,angle=swiftshader)].
[11632:0323/142158.520432:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization
/usr/bin/which: no R in (/home/user/.local/bin:/home/user/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
[11654:0323/142158.692825:ERROR:ui/gl/init/gl_factory.cc:102] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=opengl),(gl=egl-angle,angle=opengles),(gl=egl-angle,angle=vulkan),(gl=egl-angle,angle=swiftshader)].
[11654:0323/142158.697283:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization
Once Rstudio crashed this was the output:
PID: 11590 (rstudio)
UID: 1000 (jovan)
GID: 1000 (jovan)
Signal: 4 (ILL)
Timestamp: Mon 2026-03-23 14:21:58 CET (2min 58s ago)
Command Line: rstudio
Executable: /usr/libexec/rstudio/rstudio
Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-org.chromium.Chromium-11590.scope
Unit: user@1000.service
User Unit: app-org.chromium.Chromium-11590.scope
Slice: user-1000.slice
Owner UID: 1000 (jovan)
Boot ID: 2bd3a5c40f8047d495f105161dddc2ab
Machine ID: ce365df64bac41d993e4d4404e535e61
Hostname: fedora
Storage: /var/lib/systemd/coredump/core.rstudio.1000.2bd3a5c40f8047d495f105161dddc2ab.11590.1774272118000000.zst (truncated)
Size on Disk: 7M
Message: Process 11590 (rstudio) of user 1000 dumped core.
Stack trace of thread 11590:
#0 0x0000558fd47aef86 n/a (n/a + 0x0)
ELF object binary architecture: AMD x86-64
In that case, I’d try a dnf remove "R", followed by an dnf install "R" because the reinstall command is evidently not putting it back.
There’s probably a force flag or something in dnf to encourage it to be vigorous, but off the top of my head I can’t recall it and I can’t currently look it up.
So to “really” reinstall it, you would have to make sure that the underlying contentful packages (R-core etc etc) got reinstalled, and I suspect dnf reinstall doesn’t do that. The logs above suggest it doesn’t.
You could try sudo dnf remove R followed by sudo dnf install R ? (Just noticed @anothermindbomb had already posted this while I was typing!)
When I do something bad like this.. remove files that are potentially owned by rpm packages..and i need to fix the system.. there are a couple of commands I can do to help me walk myself out of the problem.
If i know the name of the missing file… I ask the local system rpmdb as to what package it thinks owns it.
Example:
$ rpm -qf /usr/bin/R
That will tell me the exact package I had installed.. and that should be sufficient to figure out how to use dnf to reinstall it again.
that’s usually the only breadcrumb I need to find which package I need to reinstall to fix. And as long as the file in question is non-privileged, I can do that command as a non-privledged user. Sometimes I have to run this command privledged if the file in question requires privledged access, but I always try to non-privledged run first.
if I don’t know the name of the file.. I can reach for a more comprehensive tool… and ask the local rpm system to verify all the packages installed.. and the review the output looking for the missing files I know I want to reinstall.
$ rpm -Va
This will include a lot of output because its a more comprehensive verification of filesystem variance compared to what the rpm packages installed…things like timestamp or permission changes. There is an 8 bit code that get interpreted into different variance conditions if you want to get deep into it and understand what the output is telling you.
But in this case what you really want to focus on are the files that are listed as missing. Anything listed as missing, means the rpmdb expects it to be there, and its not. What you have the filenames of the missing files you can query the rpm system asking for what package owns each of those missing files.
You can run this command unprivledged as well.. but if you do you’ll have additional output concerning filesystem elements that you don’t have full access to to make the verification check.
You have to watch for false positive ‘missing’ reports for files in directories you dont have permission to access if you run this command unprivledged. Don’t try to address everything in the output. Use it as a diagnostic tool to identify possible things that needs to be addressed and make good decisions about which items you need to follow up on based on the problem you are trying to solve. In this case your only trying to fix the R related filesystem deletion errors you manually made as an aid to help you figure out which specific packages you need to reinstall. Everything you manually deleted that was owned by an rpm package should show up as missing. You just need to find a couple of the obvious ones to help you identify which packages you need to reinstall.
The suggested initial sudo dnf remove R would have uninstalled R, and every package that is depended on only by R.
So a subsequent sudo dnf install R shouldn’t suffer from the “missing dependencies of an installed package” issue, because dnf no longer considers any of the relevant packages to be installed - it already removed them.
This does assume that OP’s file deletions didn’t damage any package other than R and those packages depended on only by R.