-1

I'm working on a Ubuntu 18.04.2 LTS. I wanted to upgrade R but I constantly get stuck. I've entered

sudo gedit /etc/apt/sources.list

Where I add

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ 

and saved.

Then I got this error message:

** (gedit:27981): WARNING **: 21:44:53.588: Set document metadata failed: Setting attribute metadata::gedit-position not supported

When I tried previously it worked and indeed I came here for a problem (public-key not found) which I encountered later in the process (after typing sudo apt-get update). Now I'm stuck even earlier..:((

I didn't find any thread with answers about this issue. Can someone help me? Thanks

Giulia
  • 1
  • 1
    The gedit message is unrelated. Is the file saved? – Pilot6 May 05 '20 at 19:53
  • Why did you change the question title? Running gedit with sudo is not recommended, but it works. So what is the problem? You changed the file. Why that message bothers you? You are not "stuck" with that at all. – Pilot6 May 05 '20 at 19:58
  • Hi, thanks for your answer. I changed the title because at first I wanted to ask for help because of the message about Public-Key not available, then when I tried to re-run the commands I got stuck with the warning message which previously didn't happen. So the title was not correct anymore. Anyway, yes, I saved the file. Maybe sudo gedit was not the right command to edit /etc/apt/sources.list? – Giulia May 05 '20 at 20:01
  • Run at least sudo -H gedit , or better sudo nano. But these messages don't mean you can't edit. – Pilot6 May 05 '20 at 20:02
  • Running sudo -H gedit gives me the same error. sudo nano opens a page on the terminal screen. Isn't there another command to edit and save /etc/apt/sources.list? With sudo nano I'm not sure I'm saving the document the right way. – Giulia May 05 '20 at 20:30
  • 1
    What do you mean by "'I'm not sure I'm saving the document the right way"? Ctrl+O to save Crtl+X to exit. – Pilot6 May 05 '20 at 20:46
  • Is there any specific name I should give the file when I save it? Or is it random? – Giulia May 06 '20 at 05:15
  • If you run it sudo nano /etc/apt/sources.list, it will edit this file and won't chnge its name. – Pilot6 May 06 '20 at 10:55
  • Thanks for your input. I think it's a problem of the network, anyway the laptop is old and I'll change it soon.. I'll find another way to finish my course on Coursera :/ I'll close this topic. Have a nice evening. – Giulia May 06 '20 at 18:21

1 Answers1

1

The README file on the site you want to download packages from says:

The Ubuntu archives on CRAN are signed with the key of "Michael Rutter <marutter@gmail.com>" with key ID 0x51716619e084dab9.  To add the key to your system with one command use (thanks to Brett Presnell for the tip):

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

So there goes the answer to your second problem.

** (gedit:27981): WARNING **: 21:44:53.588: Set document metadata failed: Setting attribute metadata::gedit-position not supported

That's not a problem at all -- just gedit can't save your last editing position.

jpalecek
  • 263
  • Thanks for your answer. When I run the command of README file I still get this error message: gpg: keyserver receive failed: Invalid argument – Giulia May 05 '20 at 20:23
  • Strange, it works for me. What does gpg -vv --keyserver keyserver.ubuntu.com --recv-key E298A3A825C0D65DFD57CBB651716619E084DAB9 tell you? – jpalecek May 05 '20 at 20:52
  • The same: gpg: keyserver receive failed: Invalid argument – Giulia May 06 '20 at 05:11
  • When I type sudo apt-get update I always get the same messages about these 2 public keys: NO_PUBKEY 51716619E084DAB9 NO_PUBKEY 78BD65473CB3BD13 – Giulia May 06 '20 at 05:41
  • @Giulia I meant the full debug output of the command, not only the result. Anyway, would this help you? Or this one, seems promissing. There would probably be something bad with your network, but I can't tell. – jpalecek May 06 '20 at 14:22
  • Thanks, I'll have a look tonight :) – Giulia May 06 '20 at 15:13
  • Thanks for your input. I think it's a problem of the network, anyway the laptop is old and I'll change it soon.. I'll find another way to finish my course on Coursera :/ I'll close this topic. Have a nice evening. – Giulia May 06 '20 at 18:21