13 November 2014

Mengatasi GPG error NO_PUBKEY di Ubuntu

Seringkali ketika kita melakukan update Ubuntu Linux dijumpai baris error seperti di bawah ini :


Get:27 http://archive.ubuntu.com trusty-updates/universe i386 Packages [218 kB]Get:28 http://archive.ubuntu.com trusty-updates/main Translation-en [161 kB]Get:29 http://archive.ubuntu.com trusty-updates/restricted Translation-en [1736 B]Get:30 http://archive.ubuntu.com trusty-updates/universe Translation-en [110 kB]Fetched 13.5 MB in 11s (1152 kB/s)Reading package lists... DoneW: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32W: GPG error: http://security.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32W: GPG error: http://archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

Untuk mengatasi hal seperti di atas, ketikkan perintah sebagai berikut pada terminal :

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [KEY]

Ganti [KEY] dengan bilangan hexadesimal  yang berada setelah kata NO_PUBKEY yaitu 3B4FE6ACC0B21F32 dan 40976EAF437D05B5. Jadi perintah yang harus diketikkan adalah sbb:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.Fytsv4VInU --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) " imported
gpg: Total number processed: 1

gpg:               imported: 1  (RSA: 1)

dan

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.agcbw2A0Ga --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key " imported
gpg: Total number processed: 1

gpg:               imported: 1

Ulangi sampai seluruh key yang tertera di terminal didaftarkan.

No comments: