r-lib/rig

Errors using rig with linux distribution pop_os

dpowers120 opened this issue · 10 comments

rig commands return errors with pop_os distribution. My Linux distribution information:

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy

rig add release and rig available return errors, and rig list returns nothing.

~$ rig add release
[INFO] Running `sudo` for adding new R versions. This might need your password.
[ERROR] Failed to resolve R version: Cannot download JSON: HTTP status client error (404 Not Found) for url (https://api.r-hub.io/rversions/resolve/release/linux-pop-22.04/x86_64)
~$ rig available
[ERROR] Cannot download JSON: HTTP status client error (404 Not Found) for url (https://api.r-hub.io/rversions/available/linux-pop-22.04/x86_64)

After setting environmental variable RIG_PLATFORM to 'ubuntu-22.04', rig list returns expected installations, but rig add release returns the above errors unless unless prepended with sudo -E add release (per this issue). sudo -E add release succeeds up until the install pak step (error below), unless --without-pak is added (in which case the command runs successfully).

[INFO] Installing pak for R 4.2.3 (if not installed yet)
[ERROR] Failed to to install pak for R 4.2.3: command ["su", "username", "-s", "/bin/bash", "--", "/opt/R/4.2.3/bin/R", "-s", "--vanilla", "-e", "invisible()"] exited with code 1

I tried using rig because I was having issues with R after I tried to update it, and after I tried to uninstall/reinstall R normally to resolve those issues--where R exits immediately upon startup, and RStudio fails to recognize that R is installed--and it seems like I'm running into the same issue with rig (although this might be something specific to whatever I did to mess up updating R previously/not an issue with rig).

~$ rig run
~$ 

Hi, I got this problem and the solution to this was using sudo -E ... before any command as mention in this issue #191. It's important to mention that there is still some issues with arguments like without-pak or whitout-rspm in pop_os. I got rig installed in a fedora system and there is not such problems there, only on pop as far as I know.

there is still some issues with arguments like without-pak or whitout-rspm in pop_os

What issues?

there is still some issues with arguments like without-pak or whitout-rspm in pop_os

What issues?

Hi @gaborcsardi , I just checked and for rig version 0.6.0 in pop_os installing with the argument without-p3m or without-rspm doesn't work as mention in #193 (flagged as a bug), but without-pak works well. I don't know if this happens on other ubuntu like systems.

#193 is not specific to pop os.

I believe that this is fixed now.

For those who came here with the same problem, just to be clear, to set environmental variable RIG_PLATFORM to 'ubuntu-22.04':

  1. Add export RIG_PLATFORM="ubuntu-22.04 to the file ~./profile.
  2. Save, exit the file and runs source ~/.profile.
  3. check now if echo $RIG_PLATFORM now shows ubuntu-22.04 instead of nothing, and rig system detect-platform now shows Distribution: ubuntu instead of Distribution: pop.

As mentioned by rumichaska, now run every rig command with sudo -E , for example sudo -E rig available.

As mentioned by rumichaska, now run every rig command with sudo -E , for example sudo -E rig available.

I believe that is not needed any more with the latest rig release. You can run rig normally: rig available, etc.

Hi @gaborcsardi I am still running into this issue. I am running v0.7.0, which I see was released before your comment on April 16. Is this something that is fixed, but not yet released?

For example, I get:

$ rig available                                                                                                                                                                        06/05/2024 04:07:32 PM
[ERROR] Cannot download JSON: HTTP status client error (404 Not Found) for url (https://api.r-hub.io/rversions/available/linux-pop-22.04/x86_64)

Or do I need to manually set the environment variable RIG_PLATFORM to 'ubuntu-22.04'?

Or do I need to manually set the environment variable RIG_PLATFORM to 'ubuntu-22.04'?

Seems like it.

Putting this out there for anyone else using nushell. I was using nushell, set the environment variable as listed above, but had an issue where it was append x86_64 to the request URL instead of amd64. Running in bash instead seemed to get around this, and everything installed and worked as expected.