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>
17
  • Can you edit your question and add the exact output of apt-get update
    – bain
    May 30, 2014 at 17:34
  • 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 dataIgn 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?)
    – user281814
    May 30, 2014 at 17:59
  • Sorry, I have no reputation to I can edit the question and put more than 2 links.
    – user281814
    May 30, 2014 at 18:00
  • Can you post the output of apt-config dump|grep -i proxy
    – bain
    May 30, 2014 at 18:14
  • Also can you do cat /var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_trusty_InRelease and post the output to pastebin and link to it here
    – bain
    May 30, 2014 at 18:15

10 Answers 10

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?

9
  • yes, you alright, I tried another Broadband ISP and it works fine,what I could say for the ISP to stop using transparent proxy? is transparent proxy illegal ?
    – user281814
    Jun 1, 2014 at 20:24
  • If you ISP has any kind of technical support you could complain to them. You could also route your traffic through a VPN so it is encrypted and the ISP can not interfere with it.
    – bain
    Jun 1, 2014 at 20:37
  • Do you mean that I should ask them to stop using transparent proxy? What should they do to solve this problem?
    – user281814
    Jun 1, 2014 at 20:42
  • Yes, you can ask them if there is a way to turn off the transparent proxy. To solve this problem they need to either turn off the proxy or fix it. Without knowing what software they are using, it is impossible to say how they could do this.
    – bain
    Jun 1, 2014 at 20:56
  • 1
    @user281814 Can you please mark the answer as accepted, to help other users who have this issue to find an answer.
    – bain
    Jun 4, 2014 at 13:21
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.

3
  • Worked for me without the mkdir. Mar 30, 2016 at 10:31
  • How do you undo this operation? I ran those commands, tried to update (which didn't work, I had the same problem as the person who asked the original question), and now it won't even install the old version of the software I was trying to install. Feb 17, 2018 at 19:54
  • 1
    @AnsonSavage if you followed the steps exactly, your original lists folder should still be saved as lists.old. So to reverse the operation, you should be able to do this: cd /var/lib/apt ; sudo mv lists lists.undone ; sudo mv lists.old lists ; sudo apt-get update ...which basically renames the new "broken" lists folder to lists.undone and restores the lists folder from lists.old. Hope that helps.
    – FriendFX
    Feb 21, 2018 at 4:06
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.

1
  • had this same issue, but had to change from Bridged to NAT to get it to work. Quite odd, because it worked with Bridged up until today.
    – DBrown
    Feb 13, 2021 at 1:54
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
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.

2
  • In my case, apt-cacher was the one. After removing its cache by rm -r /var/cache/apt-cacher/*, the error disappeared. Oct 24, 2015 at 3:47
  • That one did it for me: adding the line to /etc/apt/apt.conf!! Thank you
    – dmeu
    Oct 7, 2016 at 8:12
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.

0
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

2
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation.
    – waltinator
    Jan 21, 2015 at 19:54
  • @waltinator It does appear to be an attempt to answer the question.
    – Seth
    Jan 21, 2015 at 22:20
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.

3
  • 1
    archive.cononical.com looks misspelled. This was probably the reason for your issue and is not related to OP's issue. Dec 17, 2015 at 13:07
  • @DavidFoerster - Oh, I didn't see that at all. Those links where available by default, do you know how where they included ? Am puzzled. Dec 18, 2015 at 6:28
  • I have absolutely no idea, how this sources entry got into the default Ubuntu installation. Dec 18, 2015 at 12:46
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.

1
  • «Maybe not related» Thanks that was the case for me. So I confirm that there is a link.
    – tuxayo
    Dec 15, 2018 at 15:48
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .