4

I am currently on Ubuntu 14.04 (new to Ubuntu, migrated recently).

'apt-get install' works fine, and my connection is working fine as well. But when I run apt-get update, this is what happens

100% [InRelease gpgv 3,627 B] [Connecting to security.ubuntu.com  
(91.189.91.13)Splitting up /var/lib/apt/lists/partial
/in.archive.ubuntu.com_ubuntu_dists_trustyIgn 
http://in.archive.ubuntu.com trusty InRelease                              

E: GPG error: http://in.archive.ubuntu.com trusty InRelease: 
Clearsigned file isn't valid, got 'NODATA' 
(does the network require authentication?)

An exhaustive search online did not result in any clear solution. What I have tried till now:

wget https://dl.dropbox.com/u/8850924/fixpackage
chmod +x ./fixpackage
sudo./fixpackage

For the lazy, this is what fixpackage contains:

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade

Output:

100% [InRelease gpgv 3,627 B] [Waiting for headers]Splitting up /var/lib
/apt/lists/partial/security.ubuntu.com_ubuntu_dists_trusty-
security_InRelease into data Ign http://security.ubuntu.com trusty-
security InRelease

E: GPG error: http://security.ubuntu.com trusty-security InRelease: 
Clearsigned file isn't valid, got 'NODATA' (does the network require 
authentication?)

Setting up google-chrome-stable (43.0.2357.124-1) ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
100% [InRelease gpgv 3,627 B]Splitting up /var/lib/apt/lists/partial
/in.archive.Ign http://in.archive.ubuntu.com trusty InReleasea and 
signature failed
E: GPG error: http://in.archive.ubuntu.com trusty InRelease: Clearsigned
file isn't valid, got 'NODATA' (does the network require 
authentication?)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have also tried this solution

sudo apt-get clean
sudo mv /var/lib/apt/lists /var/lib/apt/lists.broke
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get update

Both the solutions didn't work for me.

Let me know if any more details are required.

0

I had the same issue because I am behind a proxy in my company. The solution is that

  1. You need to set your environnement variable

http_proxy

  1. Use your sudo command with the option

-E

sudo -E apt-get update

That option idicates to sudo command to execute preserving environment variables.

| improve this answer | |
  • 1
    Can you explain how this solution would work? and why? – Anwar Nov 4 '16 at 14:31

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