Ubuntu – Got NODATA issue: ‘NODATA’ (does the network require authentication?)

apt

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>

Best Answer

  • 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?