0

I have been trying to update apt-get on Ubuntu, but am failing in spite of having viewed a variety of different solutions to similar problems.

I am running the following command...

sudo apt-get update

I have received the following output...

Get:9 http://apt.typesafe.com unicorn InRelease [7,185 B]                                     
Err:9 http://apt.typesafe.com unicorn InRelease
  The following signatures were invalid: D2E3915347209000FA1C06D47CF8D72BE29DF322

...

W: GPG error: http://apt.typesafe.com unicorn InRelease: The following signatures were invalid: D2E3915347209000FA1C06D47CF8D72BE29DF322
E: The repository 'http://apt.typesafe.com unicorn InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I've tried re-downloading the key, but still nothing will work.

EDIT: Following installation of the package, I received the same error...

smrk007@Atticus:~/Downloads$ sudo dpkg -i repo-deb-build-0002.deb 
(Reading database ... 201875 files and directories currently installed.)
Preparing to unpack repo-deb-build-0002.deb ...
Unpacking typesafe-repo (2.0-build-0003) over (2.0-build-0003) ...
Setting up typesafe-repo (2.0-build-0003) ...
Warning: The postinst maintainerscript of the package typesafe-repo
Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
Note: Check first if apt-key functionality is needed at all - it probably isn't!
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package typesafe-repo)
OK
smrk007@Atticus:~/Downloads$ sudo apt-get update
Ign:1 https://dl.bintray.com/sbt/debian  InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                           
Get:3 https://dl.bintray.com/sbt/debian  Release [815 B]                                                                                             
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                   
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]                                                    
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                                                             
Hit:7 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                                                              
Get:9 http://apt.typesafe.com unicorn InRelease [7,185 B]                                                                                            
Err:9 http://apt.typesafe.com unicorn InRelease
  The following signatures were invalid: D2E3915347209000FA1C06D47CF8D72BE29DF322

To give some more context, I was trying to install the sbt command line tool for using scala right before this error occurred.

  • You need to both download the key signature and add it ot the apt keyring. They provide a deb package that does it all for you - apt.typesafe.com/repo-deb-build-0002.deb – ivanivan Jun 7 '18 at 1:49
  • @ivanivan I followed your advice, and am still receiving the same error... Could the key be corrupted? – smrk007 Jun 7 '18 at 2:00
-2

Try this:

sudo rm -rf /var/lib/apt/lists

Basically remove all the lists folders from the apt directory.
Add list directory with below command:

sudo mkdir /var/lib/apt/lists

Then try the below command:

sudo apt-get update
  • 2
    This also deletes the gpg certificates. You do not want to do that. This will not improve the OP situation, quite by the contrary. – Rui F Ribeiro Jul 8 '18 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.