R executable not found

Hi everyone i have just installed R, when i try to run it works with sudo i R
but when i call it without sudo in other words just R it says this "/home/moodley/anaconda3/bin/R: 263: exec: /home/moodley/anaconda3/lib/R/bin/exec/R: not found"
How do i resolve this issue.
NB. i have not done this before thanks for your patience.

i also saw that AMY_Z asked about the same issue " R: line 238: /usr/local/lib/R/etc/ldpaths: No such file or directory " I would greatly appreciate your input on this if you can share how you resolved yours step by step if its not too much to ask thanks again.

The message is telling you that /home/moodley/anaconda3/bin/R is not in the user $PATH but it is in the sudo user $PATH. It also tells me that you are at risk of continuing problems with installing R packages even if this is fixed. anaconda is a great package manager for Python. I've seen lots of anaconda related problems on this board, but no success stories. There might be some people who are perfectly happy, but they are the quiet types.

What you can do is to edit your $PATH to include /home/moodley/anaconda3/bin. If you don't know how to do that, that is a good indicator that you shouldn't try without local support from someone who can stand over your shoulder and guide you.

What you should do is to use (example for Ubuntu)

# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc 
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt install --no-install-recommends r-base

Thank you for the reply
i have edited the $PATH to include /home/moodley/anaconda3/bin/R it still does not work, and everything is up to date.
It still say "/home/moodley/anaconda3/bin/R: 263: exec: /home/moodley/anaconda3/lib/R/bin/exec/R: not found"

I don’t see this in your $PATH

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.