0

I was upgrading my system (on laptop) from 16.04 to 17.04. To do so I upgraded from 16.04 to 16.10 to 17.04 using sudo do-release-upgrade -d. It all went fine, until I tried opening my browsers (firefox and chrome). Then I performed a sudo apt-get update and got the following. How do I fix this?

Err:1 http://dl.google.com/linux/chrome/deb stable InRelease   Could not resolve 'dl.google.com'
0% [Working]
 Err:2 http://ca.archive.ubuntu.com/ubuntu zesty InRelease   Could not resolve 'ca.archive.ubuntu.com'
0% [Working]
Err:3 http://security.ubuntu.com/ubuntu zesty-security InRelease   Could not resolve 'security.ubuntu.com'
0% [Working]
Err:4 http://ca.archive.ubuntu.com/ubuntu zesty-updates InRelease   Could not resolve 'ca.archive.ubuntu.com'
0% [Working]
Err:5 http://ca.archive.ubuntu.com/ubuntu zesty-backports InRelease   Could not resolve 'ca.archive.ubuntu.com'
Reading package lists... 0%
Reading package lists... Done
W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/zesty/InRelease  Could not resolve 'ca.archive.ubuntu.com'
W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/zesty-updates/InRelease  Could not resolve 'ca.archive.ubuntu.com'
W: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/zesty-backports/InRelease  Could not resolve 'ca.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/InRelease  Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease  Could not resolve 'dl.google.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
$ exit
exit 
Script done on Sat 15 Apr 2017 03:24:29 PM ADT

edit: This question has not been answered, and none of the other answered questions have solved this.

(edit: honestly, I have given up and downgraded back to 16.04)

  • Format the output as code (the {} button in the editor or Ctrl+K) and you will be allowed to have as many URLs in it as you want. – Byte Commander Apr 15 '17 at 19:08
  • @bytecommander done. – Death_by_Ch0colate Apr 15 '17 at 19:13
  • Can you ping the mentioned domains, like ping -c4 ca.archive.ubuntu.com? – Byte Commander Apr 15 '17 at 19:16
  • Output: "ping: ca.archive.ubuntu.com: Name or service not known", I can't ping other sites like google.com either @Byte – Death_by_Ch0colate Apr 15 '17 at 19:21
  • 1
    Just to confirm that you have a DNS problem, in terminal type host www.google.com and host 8.8.8.8. The first one should fail, the second one should work. Then do ps auxc | grep dns. Tell us what happened. – heynnema Apr 15 '17 at 19:32
  • Input: "host www.google.com" Output: list of "www.google.com has address 142.166.12.(some number)" (I got that line 8 times). Input: "host 8.8.8.8" Output: "8.8.8.8.in-addr.arpa domain name pointer google-public-dns-a.google.com." The last one has no output. – Death_by_Ch0colate Apr 15 '17 at 19:42
  • Those are the correct answers for the host commands... so it looks like DNS is working. Open Software & Updates, Ubuntu Software tab, and change the server to Server for the United States and see if that helps? Are you in Canada? – heynnema Apr 15 '17 at 20:36
  • Sorry for the tardy response, I had a meeting. I switched over to "us.archive..." but I get the same error as I did before. @heynnema edit: indeed I am in canada. – Death_by_Ch0colate Apr 15 '17 at 23:41
  • Your problem sounds so much like a DNS problem, yet the host commands gave us the correct answers. They've changed the way DNS works in 17.04, and we're all still trying to figure how it works now. I don't have any more ideas for you at this time. If I come up with something... I'll be back. Cheers, Al – heynnema Apr 16 '17 at 02:23
  • @heynnema see below – Death_by_Ch0colate Apr 17 '17 at 19:32
  • @ByteCommander see below – Death_by_Ch0colate Apr 18 '17 at 16:15
  • I do not see any mention of the user using wifi and the duplicate linked to is for wifi only, it is concerning the changes in how mac addresses are handled in network manager and the DNS issue can effect both wired and wifi. – Wild Man May 25 '17 at 03:54

2 Answers2

1

I feel like I should apologise to everyone. I have come to believe that the issues I encountered were local (mainly the wifi card) and not an issue with 17.04 itself.

How do I know? I only just opened the laptop again and attempted to view websites. It worked. I performed an update and it worked. I used the terminal to ping obscure sites and it worked. The issue somehow resolved itself.

Thank you for everyone who tried to help, I will definitely get my laptop checked.

EDIT: I WAS WRONG!!!!!!!! It now says I have lost the connection again and get the same error. I spoke with a classmate and he says it's because of randomising MAC addresses. The configuration file that we suspect responsible is /etc/networkmanager/networkmanager.conf

0

Solved it the editing issue.

Here is how:

HOWEVER, there is one very important difference. Using gedit to edit the config file may give you the following terminal output (Or something very similar):

** (gedit:2540): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported** 

** (gedit:2540): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported**

To attack this, I found a bug report (here: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1575484) which basically says that GUI level editors being used for sudo level editing is generally a BAD IDEA. So instead I used VIM via the terminal and edited the config file that way. That is the only way my chnages to config file were registered, even though opening the file implied otherwise.

Good luck to anyone else who has this issue, hope it helps.