I get errors running sudo apt-get update Ubuntu 14.04, pls help

August 9, 2017 287 views
Nginx Ubuntu

The error messages after the update run is:

W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/codename/nginx/source/Sources 404 Not Found [IP: 206.251.255.63 80]

W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/codename/nginx/binary-amd64/Packages 404 Not Found [IP: 206.251.255.63 80]

W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/codename/nginx/binary-i386/Packages 404 Not Found [IP: 206.251.255.63 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

Any help appreciated..

Thank you

4 Answers

This happened after I tried to upgrade to Ubuntu 16.04.3 LTS by running 'do-release-upgrade'

You're using Debian repos on Ubuntu and you haven't replaced codename with the codename of your version (which can be found at https://nginx.org/en/linux_packages.html#distributions)

You can remove the nginx lines from sources.list(.d) and follow the instructions on the nginx package install guide to add the repository properly and resolve the error.

@vincent471497

If you would, please try running:

rm -rf /var/lib/apt/lists/*

Once ran, please try running apt-get update once again. Generally, that'll solve the issue, as long as the repositories in your sources.list file are correct and have not been modified.

...

When running do-release-upgrade, you generally need to modify the source repositories so that the command pulls from the release you want to upgrade to. This isn't generally a command I would run on a production server though as it can have some unintended side effects and require quite a bit of troubleshooting.

When it comes to major releases, such as upgrading from 14.04 to 16.04, it's often best to deploy a new server with 16.04 and migrate data over to it. It's a bit of a manual process, though it'll ensure everything runs smoothly.

  • Thank you guys for the quick response. After removing the nginx lines from sources.list I now get a warning:

    W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
    W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
    W: You may want to run apt-get update to correct these problems

    Should I be concerned with these or can I safely ignore? Thanks again!

Have another answer? Share your knowledge.