28

I can use my mobile broadband to access Internet with Firefox but when I want to install any package from terminal or make 'apt-get update' command I got the following error:

got 'NODATA' (does the network require authentication?)

apt-get update output:

Get:1 extras.ubuntu.com trusty InRelease [213 B] 98% [1 InRelease gpgv 213 B] [Connecting to archive.ubuntu.com]
Splitting up /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease into data
Ign extras.ubuntu.com trusty InRelease E: GPG error: extras.ubuntu.com trusty InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) 

output of `cat /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>404</title> <meta http-equiv="Cache-Control" content="no-cache"/> </head> <body> <p> Not Found </p> </body> </html>

output of wget:

wget -O - http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease

--2014-06-01 09:23:35--  http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease
Resolving extras.ubuntu.com (extras.ubuntu.com)... 91.189.92.152
Connecting to extras.ubuntu.com (extras.ubuntu.com)|91.189.92.152|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 213 [text/html]
Saving to: ‘STDOUT’

 0% [                                       ] 0           --.-K/s              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>404</title>
<meta http-equiv="Cache-Control" content="no-cache"/>
</head>
<body>
<p>
Not Found 
</p>
</body>
</html>
Braiam
  • 69,112

10 Answers10

25

Your mobile broadband provider is running a faulty transparent proxy. The URL http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease should return "404 Not Found". Instead it returns "200 OK" but sends 404 content. Since the URL is "OK", apt copies the content to /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease and attempts to use it, and then complains that it is incorrect.

The problem here is not Ubuntu, it is the transparent proxy of your mobile broadband provider. You might be able to contact them to fix it.

Here is the output from a normal internet connection:

$ wget -O - http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease
--2014-06-01 10:25:36--  http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease
Resolving extras.ubuntu.com (extras.ubuntu.com)... 91.189.92.152
Connecting to extras.ubuntu.com (extras.ubuntu.com)|91.189.92.152|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-06-01 10:25:36 ERROR 404: Not Found.

For some details of the problems caused by transparent proxies on mobile connections see answers to the question How to stop javascript injection from vodafone proxy?

bain
  • 12,200
13

I just had the same problem. I think my ISP also uses a rather nasty proxy.

While the solution proposed by bain might be the Right Thing To Do (TM), I found a more immediate and practical solution on the Linux Mint forum which basically involves removing the potentially broken entries from the /var/lib/apt/lists directory (or rather, the directory entirely):

$ cd /var/lib/apt
$ sudo mv lists lists.old
$ sudo mkdir -p lists/partial
$ sudo apt-get update

These commands fixed the problem for me.

FriendFX
  • 790
6

I was getting this same issue running Ubuntu 14.04 in VMWare. The comment above tipped me off to experiment with the network settings. Once I changed from the default NAT to Bridged my problem was solved.

3

I ran into the same issue after I added a ppa (Dropbox) refering to a domain which is blocked by my company's proxy (*.dropbox.com). Since apt-get update can't read http://linux.dropbox.com/ubuntu, it throws this "NODATA" error.

I ended up removing the ppa:

sudo rm /etc/apt/sources.list.d/dropbox.list
Anto
  • 2,781
3

This can also occur when apt-get is configured to use a proxy that doesn't exist (duh!). In my case, I moved a machine that was on a proxy network but forgot to remove the apt-get proxy configuration in this file:

/etc/apt/apt.conf

To my credit I had removed the environment variable entries (also see here) but simply forgot about the apt-get configuration file.

dtmland
  • 187
1

I got this error today, and the reason was because my disk was full. Maybe not related, but freeing up some space solved this issue. apt-get was showing "no space left on device" issue though.

Arda
  • 1,330
  • 11
  • 15
1

I had the same problem, it turned out to be my ISP's content controls messing with my server's DNS requests. One angry call to them got the controls disabled, and my dns returned to normal after a router reset.

1

Running into the same issue here I found out that our firewall is interfering by means of 'application control'. So be aware of url altering functions

Jeroen
  • 11
1

I was initially using a mobile data internet and so I was not able to update ubuntu 14.04 due to some proxy and got NO DATA when ever I did an

$ sudo apt-get install update

But then when I got a wired line and tried the same update it did not let me do it and gave the same NO DATA error.

But then surprisingly few software got installed through apt-get install statement.

I enquired all the world and got no answer. Lastly I tried this and it worked. Please check the following image.

I removed few check marks from the list in the image

I just tot it could help some one who came across similar issue.

I got this answer by installing a fresh ubuntu and tried "update" from the same wired connection and compared the settings and got it fixed :-) Re-leaved after a long pathless run.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
0

Recently the university where the server lies has dismissed the proxy. I've been looking for all proxy instances and removed them in ~.bashrc and in /etp/apt/apt.conf but I also needed to remove proxy settings into /etc/environment and /etc/bash.bash.rc.

This finally solved all the problems.

linello
  • 141