-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannot run rspm::enable()
unless root
#9
Comments
Mmmh... it seems that https://github.com/Enchufa2/rspm/blob/5d517f3a4e23354acae3e4793c264aa2a0ae13b0/R/centos.R#L18 with cmd <- "yumdownloader --resolve" ? |
BTW, check the path |
Hmmm. I made the adjustment in this fork and installed from source. Still running into the same problem, unfortunately. > remotes::install_github("grantmcdermott/rspm", ref = "test")
<TRUNCATED>
> tools::R_user_dir("rspm")
[1] "/local/home/gmcd/.local/share/R/rspm"
> rspm::enable()
Downloading and installing required utilities...
Loaded plugins: priorities
You need to be root to perform this command.
error: File not found by glob: *
Error: something went wrong, utilities not available |
So you cannot run e.g. |
Actually, I can. dev-dsk-gmcd-xx-xxxxxxxx % yumdownloader --resolve patchelf
Loaded plugins: priorities
amzn2-amazon | 3.1 kB 00:00
amzn2-core | 3.8 kB 00:00
amzn2-kernel | 3.8 kB 00:00
amzn2-mate | 2.7 kB 00:00
cloud-dev-dsk | 3.0 kB 00:00
dcv | 3.0 kB 00:00
firefox | 2.7 kB 00:00
1246 packages excluded due to repository priority protections
--> Running transaction check
---> Package patchelf.x86_64 0:0.12-1.el7 will be installed
--> Finished Dependency Resolution
patchelf-0.12-1.el7.x86_64.rpm | 86 kB 00:00 Sorry I'm not being more help. I'm a Linux (and R) veteran, believe it or not. But I'm brand new to RHEL/CentOS and the package management system is still pretty foreign to me. |
Perfect! Then you probably didn't restart the R session after reinstalling the package, so you were using the old version. If you can do that in bash, the patch should work. Please run the following in Bash to fix the ownership of the package folder: $ sudo chown -R gmcd:gmcd $(Rscript -e 'cat(tools::R_user_dir("rspm"))') Then reinstall your fork with |
That looks like it does something, but unfortunately still hitting the root requirement. > rspm::enable()
Downloading and installing required utilities...
Loaded plugins: priorities
amzn2-amazon | 3.1 kB 00:00:00
amzn2-core | 3.8 kB 00:00:00
amzn2-kernel | 3.8 kB 00:00:00
amzn2-mate | 2.7 kB 00:00:00
cloud-dev-dsk | 3.0 kB 00:00:00
dcv | 3.0 kB 00:00:00
firefox | 2.7 kB 00:00:00
1246 packages excluded due to repository priority protections
--> Running transaction check
---> Package patchelf.x86_64 0:0.12-1.el7 will be installed
--> Finished Dependency Resolution
patchelf-0.12-1.el7.x86_64.rpm | 86 kB 00:00:00
warning: Unable to get systemd shutdown inhibition lock
warning: Unable to get systemd shutdown inhibition lock
error: Unable to change root directory: Operation not permitted
Error: something went wrong, utilities not available I'll have to leave it there for this evening, unfortunately. We're about to get hit with a strategic power outage because of high temps and strong winds. (The joy of the Pacific Northwest fire season...) I'll try to pick up again over the weekend. Thanks again for your help. It's much appreciated. |
This shows that the fix works. :) Unfortunately, it seems that you still have issues with directories owned by root, most probably derived from having run R with sudo. :( |
Reopening, because it seems that in fact there is an issue with the rpm command, and not with your directories. I've been able to reproduce this thanks to #10. |
v0.2.3 on CRAN. |
Late to the game, because I was only able to test now. But I can happily confirm that it works now thanks to the linked PR. This will be very useful for a bunch of people on my team. Thanks @Enchufa2! |
Hi Iñaki,
I just installed rspm on an Amazon Linux 2 cloud desktop and it's working a charm. System deps and package binaries all handled without a hitch. Thank you!
The one catch I'm running into is that I'm being forced to run R as root for it to work. Launching a plain
R
session yields the following error:The same command (and subsequent package installs) carry through without a problem if start a
sudo R
session.While it's not the worst problem in the world---and any R packages installed during a sudo session are obviously available to my regular user after the fact---I was surprised by this root requirement. I thought everything was installed into the user home. Do you think it's an artifact of the federated user setup we have in these cloud environments? Any troubleshooting tips would be greatly appreciated.
P.S. I'm running the latest CRAN version of rspm (0.2.1).
The text was updated successfully, but these errors were encountered: