2

I just migrated from Ubuntu 18.04 to Ubuntu 20.04. After days of struggle from drivers incompatibility, I thought everything works well until I realized my computer cannot connect to the LAN internet.

Most internet-related problems that I read refers to netplan:

From what I understood, netplan is being used to manage everything related to networking on Ubuntu 20.04. So I followed the tutorials and updated my /etc/netplan/01-network-manager-all.yaml to:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      dhcp4: true

When I tried to run either sudo netplan generate or sudo netplan apply. I got an error message:

sudo: netplan: command not found

I thought probably it's because netplan is not installed (weirdly). So I tried to run this command:

sudo apt install netplan

But I encountered this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package netplan is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'netplan' has no installation candidate

Any idea what should be done? Feel free to also suggest on how to improve the question. Thanks in advance!

3 Answers3

5

It looks like your 18.04 upgrade to 20.04 didn't complete properly. This will probably take a clean install of 20.04 to fix, but we can try this...

In terminal...

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install netplan.io

Then edit /etc/netplan/01-network-manager-all.yaml so it looks like this...

network:
  version: 2
  renderer: NetworkManager

sudo netplan generate

sudo netplan apply

reboot

heynnema
  • 73,649
0

If the netplan command is not found, try:

sudo apt install netplan.io

instead of

sudo apt install netplan
0

My Ubuntu 20.04 was using NetworkManager. I had to use:

sudo netplan apply  

And the below commands to have wired connection working.

sudo nmcli networking off
sudo nmcli networking on
karel
  • 122,292
  • 133
  • 301
  • 332