8

I used all the given answers from here: "GPG error: Release: The following signatures were invalid: BADSIG"

But still I get the same error every time:

Reading package lists... Done
W: GPG error: http://archive.canonical.com precise Release:
 The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.canonical.com precise Release' 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.

First try:

ahadji05@ahadji05-UX330UAR:~$ gpg --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192
gpg: key 16126D3A3E5C1192: 3 signatures not checked due to missing keys
gpg: key 16126D3A3E5C1192: public key "Ubuntu Extras Archive Automatic 
Signing Key <[email protected]>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1

ahadji05@ahadji05-UX330UAR:~$ gpg --export --armor 16126D3A3E5C1192 | sudo apt-key add -
OK

ahadji05@ahadji05-UX330UAR:~$ sudo apt-get update
Ign:1 http//archive.canonical.com precise InRelease
Hit:2 http//security.ubuntu.com/ubuntu bionic-security InRelease             
Reading package lists... Done  
W: GPG error: http://archive.canonical.com precise Release:
  The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http://archive.canonical.com precise Release' 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.

Then I tried this:

ahadji05@ahadji05-UX330UAR:~$ sudo -i
root@ahadji05-UX330UAR:~# apt-get clean
root@ahadji05-UX330UAR:~# cd /var/lib/apt
root@ahadji05-UX330UAR:/var/lib/apt# mv lists lists.old
root@ahadji05-UX330UAR:/var/lib/apt# mkdir -p lists/partial
root@ahadji05-UX330UAR:/var/lib/apt# apt-get clean
root@ahadji05-UX330UAR:/var/lib/apt# apt-get update
Ign:1 http//archive.canonical.com precise InRelease
Get:2 http//sd.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]                                        
Get:3 http//archive.canonical.com precise Release [8,180 B]                                               
Get:4 http//archive.canonical.com precise Release.gpg [181 B]                                                        
Get:5 http//security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                           
Get:6 http//sd.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]          
Ign:4 http//archive.canonical.com precise Release.gpg         
........
Get:70 http//sd.archive.ubuntu.com/ubuntu bionic-backports/universe translation-en [1,604 B]                                                                                                              
Get:71 http//sd.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,352 B]                                                                                                       
Get:72 http//sd.archive.ubuntu.com/ubuntu bionic-backports/universe DEP-11 48x48 Icons [29 B]                                                                                                             
Get:73 http//sd.archive.ubuntu.com/ubuntu bionic-backports/universe DEP-11 64x64 Icons [29 B]                                                                                                             
Reading package lists... Done                                                                                                                                                                              
W: GPG error: http//archive.canonical.com precise Release:
 The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http//archive.canonical.com precise Release' 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.

And finally this:

ahadji05@ahadji05-UX330UAR:~$ sudo apt-get clean
ahadji05@ahadji05-UX330UAR:~$ sudo mv /var/lib/apt/lists /tmp
ahadji05@ahadji05-UX330UAR:~$ sudo mkdir -p /var/lib/apt/lists/partial
ahadji05@ahadji05-UX330UAR:~$ sudo apt-get clean
ahadji05@ahadji05-UX330UAR:~$ sudo apt-get update
Ign:1 http//archive.canonical.com precise InRelease
Get:2 http//sd.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]        
Get:3 http//archive.canonical.com precise Release [8,180 B]                                               
Get:4 http//archive.canonical.com precise Release.gpg [181 B]                                                       
Ign:4 http//archive.canonical.com precise Release.gpg                                    
Get:5 http//security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]           
Get:6 http//sd.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]       
Get:7 http//sd.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                 
Get:8 http//sd.archive.ubuntu.com/ubuntu bionic/main i386 Packages [1,007 kB]                 
Get:9 http//sd.archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,019 kB]                 
Get:10 http//security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [269 kB]
Get:11 http//sd.archive.ubuntu.com/ubuntu bionic/main Translation-en [516 kB]  
.......
Get:72 http//sd.archive.ubuntu.com/ubuntu bionic-backports/universe DEP-11 48x48 Icons [29 B]                                                                                                             
Get:73 http//sd.archive.ubuntu.com/ubuntu bionic-backports/universe DEP-11 64x64 Icons [29 B]                                                                                                             
Reading package lists... Done                                                                                                                                                                              
W: GPG error: http//archive.canonical.com precise Release:
 The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5
E: The repository 'http//archive.canonical.com precise Release' 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.

In all the cases I got the same error...

9
  • What is the Ubuntu version? precise is 12.04 that is EoL.
    – Pilot6
    Feb 21, 2019 at 18:28
  • ahdji05@ahdji05-UX330UAR:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic Feb 21, 2019 at 18:32
  • 1
    Edit /etc/apt/sources.list and remove lines containing precise. It can be done in Software & Updates GUI too.
    – Pilot6
    Feb 21, 2019 at 18:34
  • 1
    You won't lose anything. This line is there by an error. You probably ran some obsolete command found in the net.
    – Pilot6
    Feb 21, 2019 at 18:37
  • 1
    You can post output of cat /etc/apt/sources.list to your question to make it more clear.
    – Pilot6
    Feb 21, 2019 at 18:38

1 Answer 1

12

Remove obsolete repositories form sources.list

This question relates to Ubuntu 18.04, Bionic The OP added, by mistake, an obsolete repository for Ubuntu 12.04, Precise, which has reached the end of its life. This obsolete repository does not exist any more and results in the error:

E: The repository 'http//archive.canonical.com precise Release' is not signed. 

The solution is to remove the offending line from sources.list.

GUI method:

Open the program "Software and Updates"

enter image description here

Then go to the Other Software tab:

enter image description here

Find each line that has precise on it. Highlight one line at a time. Press the Remove button at the bottom of the window.

Repeat for all lines with precise on it. These lines refer to obsolete repositories for Ubuntu 12.04. You are using Ubuntu 18.04, one of the currently supported versions.

Command line method:

Open a terminal by pressing Ctrl+Alt+T and type:

sudo nano /etc/apt/sources.list

Now you will be able to edit the sources.list file. Look for the line:

deb http://archive.ubuntu.com/ubuntu precise Release

Delete this and any other line with precise in it.

Exit nano editor by pressing Ctrl+X. The editor will prompt you to save the changes. Press Y and then press Enter to select the default file name.

Hope this helps

4
  • This is not related. OP has a problem not in "Other Software", but in the main sources.list.
    – Pilot6
    Feb 21, 2019 at 18:49
  • They may show here, or not. I am not sure. Sources from /etc/apt/sources.list.d are shown here.
    – Pilot6
    Feb 21, 2019 at 18:59
  • 1
    @Pilot6 I temporarily added a Precise repository deb http://archive.ubuntu.com/ubuntu precise Release in my sources.list and uploaded the new Software and Update screenshot in my answer.
    – user68186
    Feb 21, 2019 at 19:15
  • 1
    Well done +1...
    – Pilot6
    Feb 21, 2019 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .