0

enter image description here Did a fresh install of Ubuntu 20.04. When I try to install any package, it gives me the below error:

"Cannot initiate the connection to archive.ubuntu.com:80"

Can someone please help to resolve the issue

guntbert
  • 13,134
sreya
  • 3
  • 1
    Please edit your question to show us 1) The your complete netplan settings (in /etc/netplan/*), 2) The complete output of ip addr, and 3) The complete output of route. – user535733 Dec 23 '20 at 19:52
  • @user535733 Added the screen shot – sreya Dec 23 '20 at 20:11
  • Next time, please use copy/paste for text output instead of screenshots. Your Ubuntu server did acquire a LAN IP address: 10.166.120.8, just like you told it to, so looks like your Ubuntu server is working properly. Check the settings on your Gateway or Router, to ensure that you are really permitting network access by that server. Of course, that's a Networking issue, not an Ubuntu-related issue. – user535733 Dec 24 '20 at 00:14

1 Answers1

0

While running "apt-get update" or something just add "-o Acquire::ForceIPv4=true"
something like:

apt-get update -o Acquire::ForceIPv4=true

but to solve this problem permanently create a file with "99force-ipv4 in /etc/apt/apt.conf.d/" directory and add following stuff:

Acquire::ForceIPv4 "true";

Karthik J
  • 18
  • 6