apt gpg key error on ubuntu 14.04.3

solution 1
==============
 # apt-get clean
 # cd /var/lib/apt
 # mv lists lists.old
 # mkdir -p lists/partial
 # apt-get clean
 # apt-get update

solution 2
===============
Run below script
===============
 #!/bin/bash

OLDIFS=$IFS
IFS=$'\n'

lines=`sudo apt-get update 2>&1 | grep "NO_PUBKEY"`

for line in $lines
do

        key=`echo $line | tail --bytes=17`

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

        SOMETHINGDONE="true"

done

IFS=$OLDIFS

if [ $SOMETHINGDONE ]
then
        sudo apt-get update
fi

No comments:

Post a Comment