E: The repository 'http//archive.canonical.com precise Release' is not signed
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...
Solution 1:
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"
Then go to the Other Software tab:
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