Skip to content
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

Show how to align PATH #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Show how to align PATH #34

wants to merge 1 commit into from

Conversation

mauro-ixpantia
Copy link
Contributor

@mauro-ixpantia mauro-ixpantia commented Jan 9, 2025

This is a fresh rocker/verse environment

root@bac7ae3e0007:/# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
Codename:	noble

I installed the Rust toolchain successfully using the instructions in README

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

The shell finds .cargo/bin in the PATH

root@bac7ae3e0007:/# which cargo
/root/.cargo/bin/cargo

But R can't find it

root@bac7ae3e0007:/# Rscript -e "Sys.getenv('PATH')"
[1] "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/bin/linux:/usr/local/texlive/bin/linux/"

We can fix it by adding .cargo/bin to the PATH in .Renviron

root@bac7ae3e0007:/# echo "PATH=${HOME}/.cargo/bin:${PATH}" >> /root/.Renviron
root@bac7ae3e0007:/# Rscript -e "Sys.getenv('PATH')"
[1] "/root/.cargo/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/bin/linux"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant