Ubuntu 18.04 returns “not found” for Azure CLI install via apt

A quick note for anyone else who encounters this issue…

Recently I tried to install the Azure CLI via apt following the steps in “Install Azure CLI with apt”, I received the error “source not found”, even after modifying my sources list as described in the article.

When I enumerated the sources.list on my Ubuntu 18.04 LTS build, I felt like the list was a little shorter than it should be.

cat /etc/apt/sources.list

Frustrating, to say the least. This was my Ubuntu 18.04 LTS from Canonical, created via the new ‘”Quick Create” experience on Windows 10.

The Fix

After reading the issues others had with this in Github comment threads with no fix, I quickly decided to go back to basics.

To resolve the issue, I tried replacing my sources.list file from a known good source of the default sources.list file, as shown below.

Backup the original /etc/apt/sources.list

sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup

Download my updated /etc/apt/sources.list

cd /etc/apt/
sudo wget https://gist.githubusercontent.com/h0bbel/4b28ede18d65c3527b11b12fa36aa8d1/raw/a4ab1c13a92171822215143b1e3b3eb6add7a78d/sources.list">https://gist.githubusercontent.com/h0bbel/4b28ede18d65c3527b11b12fa36aa8d1/raw/a4ab1c13a92171822215143b1e3b3eb6add7a78d/sources.list

Problem solved.

Print Friendly, PDF & Email
Posted in Blog, Linux, Windows10

Leave a Reply

%d bloggers like this: