Score:1

Unable to find R in ubuntu while r-base is correctly installed

ua flag

After upgrading to Ubuntu 22.04.2 LTS , I decided to update my version of R to 4.3. After encountering several difficulties, I completely removed R (including removing all system files related to R, such as /usr/lib/R). However, even after reinstalling R, I was unable to get the program to work. All the programs that are using R like Rstudio are not working and it looks like R is not found by Ubuntu.

command not found: R

But if I try to reinstall R, it indicates that everything is properly installed.

> ~ ❯❯❯ sudo apt install -y r-base r-base-core r-recommended r-base-dev  ✘ 127  
Reading package lists... Done 
Building dependency tree... Done
Reading state information... Done
r-base-core is already the newest version (4.3.0-1.2204.0).
r-base-dev is already the newest version (4.3.0-1.2204.0).
r-base is already the newest version (4.3.0-1.2204.0).
r-recommended is already the newest version (4.3.0-1.2204.0).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

I have tried multiple times to uninstall and reinstall, but I haven't found any solution. Does someone know how to make it works.

Score:1
jp flag

I completely removed R (including removing all system files related to R, such as /usr/lib/R).

Tells me that you manually deleted some R related files and considered that as an uninstall of R ... Regardless of what you did, APT will still consider R as installed as it will not look around to see that you have deleted some files but it will rather check its database of installed packages which will tell it that R is installed and therefore it will report as such when you try to install it.

APT uninstalls packaged with apt remove <package> or apt purge <package> and only then it will consider a package not-installed.

To fix that, you'll need to reinstall with APT's --reinstall flag like so:

sudo apt install --reinstall r-base r-base-core r-recommended r-base-dev

That will tell APT to perform an actual install regardless if those packages are reported as installed or not in its database.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.