4

When I logged in to my Ubuntu Server in VirtualBox this message appeared below "failed to connect to https //changelogs.ubuntu.com/meta-release-lts. Check your Internet Connection or Proxy Settings" is this because I used the command git config --global --unset https.proxy?. I used that command since I encoured problem when cloning a github repository, it says fatal unable to acess: could not resolve host: github.com

how do I solve this problem?

SeniorBear
  • 41
  • 1
  • 1
  • 2
  • There is no relation between the error message and your git command. The given URL appears in `/etc/update-manager/meta-release`, which belongs to the `ubuntu-release-upgrader-core` package. It does not use git, so git settings are irrelevant. You could try running `do-release-upgrade -c` to see if you get any helpful error messages. – Gerald Schneider Sep 18 '22 at 13:07
  • Since github.com does not work, the issue seems to be related to malfuctioning DNS. On ubuntu it's typically a problem with systemd-resolved. Since it's virtualbox, the issue might be that the Virtualbox is trying to use your host systems DNS server, and there is some issue with that. Try bypassing the automatic DNS settings by editing /etc/resolv.conf and by adding: nameserver 8.8.8.8 – PHZ.fi-Pharazon Dec 26 '22 at 18:35

3 Answers3

3

In Ubuntu 20.04 LTS focal there seems to be a certificate issue that prevents do-release-upgrade.

If you have this case, the fix is to edit

/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py 

and to add

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

(I put them after from to the beginning, but might work just by adding them to the top). After this do-release-upgrade started to work.

See https://www.reddit.com/r/Ubuntu/comments/yajzo2/upgrade_2004_to_2204_fails_because_of_https/

PHZ.fi-Pharazon
  • 261
  • 1
  • 10
  • 1
    I had the exact same issue above but also another one related to Ubuntu Pro subscription not installing. Was able to use this hack to fix that also; although I had to tweak another file in the python stack. For those who do this, be careful though. You should undo the change after the task is complete to prevent unexpected security exposure. – Timothy C. Quinn Apr 09 '23 at 03:07
1

I was messing around with gateways, bridges etc. and received the same error.

sudo apt reinstall ubuntu-release-upgrader-core

fixed it for me.

0

In your case, it seems that DNS (or Internet) is not working. I also got this error message, when my computer was missing all connectivity. For note, I have another computer where network works ok (since I'm remote connecting it), but I still get the error message above...

Here are instructions step by step to find out where the internet connection problem:

1) IP traffic

ping 8.8.8.8

In my case I had ethernet cable, but no interface up. I had to first check out the interface name:

dmesg |grep eth

That outputed the device had been renamed as "em1" on my machine. On your machine it's probably something else. After this I was able to raise up the network (depending on your network settings of course) for example by:

ifconfig em1 192.168.1.123/24
route add default gw 192.168.1.1

Run again ping 8.8.8.8 to determine whether it works.

2) DNS

If the above step worked, then you can determine whether DNS works.

ping ubuntu.com

If not, then you can set manually the DNS settings by editing on terminal:

sudo nano /etc/resolv.conf

and enter to the top:

nameserver 8.8.8.8

This is Google's name server. After this try ping and do-release-upgrade again.

PHZ.fi-Pharazon
  • 261
  • 1
  • 10