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

Failed to to install pak #226

Open
mhurtado13 opened this issue Apr 18, 2024 · 14 comments
Open

Failed to to install pak #226

mhurtado13 opened this issue Apr 18, 2024 · 14 comments

Comments

@mhurtado13
Copy link

[ERROR] Failed to to install pak for R 4.1.3: Failed to find user HOME

@gaborcsardi
Copy link
Member

I am afraid you'll have to tell us what kind of system this is.

@mhurtado13
Copy link
Author

Hello, thanks for your quick answer!

My system is Ubuntu 22.04 and this happens when I ran "rig add version"

For now it's working when I put "rig add version --without pak" but I just wanted to know if there is a way to solve it cause I didn't find information about this.

@gaborcsardi
Copy link
Member

What is the output of these?

id 
echo $HOME

Can you show the full output of

rig add release

?

@mhurtado13
Copy link
Author

image

image

@gaborcsardi
Copy link
Member

Is it possible that your sudo is configured not to keep environment variables. E.g. can you copy-paste the output if these?

export FOO=bar
sudo R -q -e 'Sys.getenv("FOO")'
sudo -E R -q -e 'Sys.getenv("FOO")'

@mhurtado13
Copy link
Author

image

@gaborcsardi
Copy link
Member

I am running out of ideas, but what's the output of this?

sudo R -q -e 'Sys.getenv("HOME")'
sudo -E R -q -e 'Sys.getenv("HOME")'

@mhurtado13
Copy link
Author

image

@gaborcsardi
Copy link
Member

Do you have some special sudo installed or configured? E.g. did you change /etc/sudoers?

What's the output of these?

which -a sudo
dpkg -l | grep sudo

@mhurtado13
Copy link
Author

No that I know, this computer belong to the center where I work so there is a super user who administrates it. However, I have sudo privileges (can install with sudo normally) Not sure if it is related though

image

@gaborcsardi
Copy link
Member

Yes, I suspect that this is an interaction of how your sudo is set up and how rig works. I would be happy to fix it in rig, but I don't really know what is going wrong.

Nevertheless, in the meanwhile you can use --without-pak, and if you want to install pak later, you can do that with

source("https://pak.r-lib.org/install.R")

@mhurtado13
Copy link
Author

Yes, I installed it on that way (without-pak) I know it is not a big issue cause you always can install pak after from R so no big deal. Thanks anyway for your fast replies and for your great work regarding rig! Amazing tool 👍🏽

@gaborcsardi
Copy link
Member

I'll leave this issue open until the next rig release, and before the next release I'll some more debug logging to this part, so we'll have a chance to see what's going wrong.

@llrs
Copy link

llrs commented Jun 17, 2024

I have the same trouble, in my case my user name is tied to the Microsoft account from the work place and it contains an @ (which I thought could be a problem):

[email protected]@mod2-m49:~$ id
uid=868805708([email protected]) gid=868803355([email protected]) groups=868803355([email protected]),27(sudo),999(shiny),1002(work),1003(shiny-apps),868800513(usuarios del [email protected])
[email protected]@mod2-m49:~$ pwd
/home/[email protected]

All the other info is similar to what is reported by Marcelo Hurtado.

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

No branches or pull requests

3 participants