0

I have made a similar question but it was closed here: Difficulties on trying to (re)install R

As I work in WSL I believe my situation is a bit specific. After uninstalling R and going through some tutorials as the one suggested to me (in the closed question above) I am still not able to reinstall R in WSL.

Right now I'm stuck in this part of a tutorial described here How do I restore the default repositories? because in WSL "Softwares Sources" window will not popup like in regular ubuntu OS. Probably must have some way for one to do that update in the command line, but I haven't found it so far.

In case I want to update source, from this step on:

~$ sudo mv /etc/apt/sources.list ~/
~$ sudo touch /etc/apt/sources.list
~$ lsb_release -c -s
bionic
~$ ###### Ubuntu Main Repos
~$ deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse

Command 'deb' not found, did you mean:

command 'deb3' from deb quilt command 'debc' from deb devscripts command 'edb' from deb edb-debugger command 'dub' from deb dub command 'dex' from deb dex command 'xdeb' from deb xdeb command 'dab' from deb bsdgames command 'debi' from deb devscripts command 'dep' from deb go-dep command 'derb' from deb icu-devtools

Try: sudo apt install <deb name>

Some of my other logs:

$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic InRelease
Hit:2 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease
Hit:3 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease
Hit:4 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu bionic InRelease
Reading package lists... Done

[Should I try to fix these 4 Hits?]

I have noticed that there is still a directory called R which I do not know if is causing any conflict with me trying to reinstall R (so, maybe should I delete it manually?).

/etc/R$ ls
Makeconf  Renviron.site  Rprofile.site  ldpaths  repositories

Finally, at /etc/apt/sources.list.d there are several files that I don't know either if I should manually delete them.

/etc/apt/sources.list.d$ ls
c2d4u_team-ubuntu-c2d4u4_0_-bionic.list  c2d4u_team-ubuntu-c2d4u4_0_-bionic.list.save  webupd8team-ubuntu-sublime-text-2-bionic.list  webupd8team-ubuntu-sublime-text-2-bionic.list.save

Thanks for the answers, in advance!

FINAL EDIT

HUGE thanks to https://askubuntu.com/users/1165986/notthedr01ds for giving me clues. Helped me figure that deb lines are not commands.

I'll describe briefly what solved my issue:

#1 created a new file of sources.list in Notepad adding this text https://gist.github.com/h0bbel/4b28ede18d65c3527b11b12fa36aa8d1 on it. Because mine is Ubuntu 18.04.1 LTS Bionic Beaver. I've checked to not save the file as "sources.list.txt".

#2 moved the new sources.list to '/etc/apt/' by:

sudo mv /path/to/sources.list /etc/apt/sources.list

#3 Done. As I was looking for an answer to allow me to reinstall R it solved my problem. BTW, I follow this installation of R from cran:

https://cran.r-project.org/bin/linux/ubuntu/ and also troubleshooting from here: https://github.com/stan-dev/rstan/issues/863

  • The deb lines aren't commands; they are lines that should be in your /etc/apt/sources.list. However, I don't think that's your problem, even though someone marked it as a duplicate (but I'm not an apt expert by any means). It seems more likely to me that the other duplicate. I would suggest restoring your /etc/apt/sources.list (assuming that you backed it up as per the instructions), and then try some of the answers in the "Broken Packages" question. – NotTheDr01ds Oct 12 '21 at 22:53
  • I would start with the third answer down, personally -- sudo apt-get autoremove and see if that helps. – NotTheDr01ds Oct 12 '21 at 22:54

0 Answers0