You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI Ubuntu: "apt update" Returns "Could not resolve 'security.ubuntu.com'"

Applies To:

Oracle Cloud Infrastructure - Version N/A and later

Linux x86-64

Symptoms:

When executing "apt update" or "apt-get update" on Ubuntu, the command can return an error about resolving software source.

For example,

# apt update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Could not resolve 'security.ubuntu.com'

Cause:

When Network Manager is installed, a new netplan configuration replaces the old networkd with network-manager, taking control of all networking devices.

Solution:

  • Comment out all interfaces in the networkd configuration file:
# nano /etc/network/interfaces
##auto ens3
##iface ens3 inet dhcp
...
#
  • Enable Network Manager in the Netplan configuration file:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!