Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 15

apt-get update failing with "Conflicting distribution" error

Solved! Go to Solution.

I have a GitHub Action workflow that runs an apt-get update. The job's runs-on is ubuntu-18.04. I get an error like this:

 

Reading package lists...
W: Conflicting distribution: https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease (expected xenial but got stable)
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Origin' value from 'microsoft-ubuntu-xenial-prod xenial' to 'vscode stable'
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Label' value from 'microsoft-ubuntu-xenial-prod xenial' to 'vscode stable'
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Suite' value from 'xenial' to 'stable'
E: Repository 'https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease' changed its 'Codename' value from 'xenial' to 'stable'

 

This isn't a repository I added as part of the action, and the workflow worked a couple days ago. Did something change with GitHub Actions that I need to account for?

14 Replies
Highlighted
Copilot Lvl 2
Message 2 of 15

Re: apt-get update failing with "Conflicting distribution" error

Have this problem too, workflow was fine yesterday.

Highlighted
Ground Controller Lvl 1
Message 3 of 15

Re: apt-get update failing with "Conflicting distribution" error

/me too

 

Problem started about 2h ago.

 

Highlighted
Copilot Lvl 2
Message 4 of 15

Re: apt-get update failing with "Conflicting distribution" error

Highlighted
Copilot Lvl 2
Message 5 of 15

Re: apt-get update failing with "Conflicting distribution" error

I also have the same problem

 

Browsing the package index it's complaining about, it looks like something was pushed today by microsoft: https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/

Highlighted
Copilot Lvl 3
Message 6 of 15

Re: apt-get update failing with "Conflicting distribution" error

I also face this problem !! 

Highlighted
Ground Controller Lvl 2
Message 7 of 15

Re: apt-get update failing with "Conflicting distribution" error

Also facing the same issue!

Highlighted
Ground Controller Lvl 1
Message 8 of 15

Re: apt-get update failing with "Conflicting distribution" error

Aslo getting this error, my docker builds are failing :(

Highlighted
Copilot Lvl 3
Message 9 of 15

Re: apt-get update failing with "Conflicting distribution" error

Also running into this issue, seems to be a problem with the microsoft repos that are included by default with github actions. This should hopefully be solved soon. It seems to happen every so often with the microsoft repos, last time i had a sync error message from one of their repos and had to rerun the action at a later time.

Highlighted
Ground Controller Lvl 2
Message 10 of 15

Re: apt-get update failing with "Conflicting distribution" error

There is an issue with a xenial reference being included in the microsoft-prod list. You can work around it with the following step at the start of any job that involves an apt-get update:

      - name: Fix broken apt list
if: matrix == null || matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-18.04' run: sudo perl -p -i -e 's#16\.04/prod xenial#18.04/prod bionic#' /etc/apt/sources.list.d/microsoft-prod.list{,.save}