1

Before posting I read through several questions with a similar subject. Still, since I couldn't find any that specifically mention the repository I'm having trouble with, I didn't feel confident moving forward. Please forgive the potential duplicate question.

I've inherited a server running Ubuntu 14.04.5 LTS, Trusty Tahr that has about 30 websites on it. Managing the server is new for me, but it's definitely been exciting to learn.

Recently, I ran apt-get update, which ended with:

W: Failed to fetch http://download.bareos.org/bareos/release/latest/Debian_7.0/Packages  404  Not Found [IP: 185.170.114.121 80]

Possible solutions I've noted but haven't tried:

  • Running apt-get dist-upgrade, and then trying apt-get update again
  • Replacing domains in /etc/apt/sources.list with old-releases.ubuntu.com
  • Running sudo rm -rf /var/lib/apt/lists/* and then apt-get update

I've been reluctant to try anything without having a good grip on what the risks are.

My question(s):

  1. What happens if I run apt-get upgrade without attempting to resolve that 404?
  2. If I replace domains in /etc/apt/sources.list and get the previous release of Debian, will apt-get update continue to use the old-releases in the future?
  3. Are the possible solutions I mention above relevant here?

I appreciate any help!

3
  • 5
    Lots of things wrong here. Ubuntu is not Debian. Do not add Debian repositories to Ubuntu. Bareos has repositories specifically for Ubuntu with packages for Ubuntu. The other problem is Ubuntu 14.04 is almost End of Life. Your main concern now should be planning the upgrade to a supported release, either the next LTS 16.04 or the current 18.04. – user880592 Feb 7 '19 at 21:44
  • 1
    Ubuntu 14.04 LTS is from 2014.April (yy.mm is format of releases) which came with 5 years of free supported life which as @GabrielaGarcia noted is nearing EOL. You can opt to convert it to 14.04 ESM to extend life - but that's a paid support, and ESM like EOL releases are off-topic here so you'll be paying for support (I'm providing another alternative). Mixing debian sources can temporarily solve a problem, but leave minefields in your system to trip you later if you're not careful, don't test & weigh up costs each upgrade. But yes you can upgrade with the 404, but I'd suggest removing it – guiverc Feb 7 '19 at 21:54
  • I appreciate the comments. I'm definitely beginner level here. – Jeramiah Harland Feb 8 '19 at 16:23
3

That repository does no longer serve packages for Debian 7. But they have a repo for Ubuntu 14.04 specifically, so you should use that instead of any Debian version anyway.

Referring to the installation instructions here, to fix your issue, the simplest way is:

  1. Find the list file where this "bareos" repository is configured. It might be something like /etc/apt/sources.list.d/bareos.list. If you have trouble, try this command to search for matching lines in all relevant files:

    grep bareos /etc/apt/sources.list{,.d/*.list}
    
  2. You will find a line like this in that file:

    deb http://download.bareos.org/bareos/release/latest/Debian_7.0 /
    

    For Ubuntu 14.04, replace this with the following instead:

    deb http://download.bareos.org/bareos/release/latest/xUbuntu_14.04 /
    
  3. It could be that you might need to install the new repository's key, but probably they use the same key for all of their current and past repos, so you should have it already. If you get an error that the repository key is missing, it can be downloaded from the same new URL as above and added with:

    curl http://download.bareos.org/bareos/release/latest/xUbuntu_14.04/Release.key | sudo apt-key add - 
    
  4. Update your package lists and install any available upgrades, as usual.

    sudo apt-get update
    sudo apt-get upgrade
    

About the three questions you specifically asked in your post:

What happens if I run apt-get upgrade without attempting to resolve that 404?

Nothing special. You just would not be able to install or upgrade any packages from that broken repository. All others continue to work.

However, you would be stuck with a potentially outdated, unsupported version of your application, which could imply all kinds of problems, including security threats.

If I replace domains in /etc/apt/sources.list and get the previous release of Debian, will apt-get update continue to use the old-releases in the future?

Not sure what you mean. There is no repository for any "previous release of Debian" either. Only Debian 8 and newer, but even using those makes no real sense when there are specific Ubuntu repositories for your appropriate system release version. I also don't quite understand what you mean by old-releases.

Are the possible solutions I mention above relevant here?

  • apt-get dist-upgrade is completely unrelated and won't have any effect on the issue here. This command just upgrades your installed packages (with the extra power to uninstall stuff if necessary, in contrast to just apt-get upgrade) to the latest versions it knows of, which are described in the package lists you update using the apt-get update command. A missing repository server can not be fixed with local package upgrades of any kind.

  • old-releases.ubuntu.com hosts the former official repositories of no longer supported Ubuntu versions. Your Ubuntu version has not yet reached end of life though, so you won't find anything for it on there. And the broken repository in question is not even an official Ubuntu repository but hosted by a completely unrelated third party. You will never find their packages on there.

  • Deleting /var/lib/apt/lists/* can be helpful if your downloaded package lists are corrupt somehow, as it forces apt-get to completely download everything again when you run apt-get update. However, as your problem is that your configured repository does no longer exist on the server, it can not be fixed by deleting your local cached copy of the package lists and trying to download them again. They're still no longer available on the server.

2
  • Thank you for taking the time to write this up, it has definitely helped. Regarding the "old-releases" question: While looking for solutions, I read to update the package repository URLs with old-releases.ubuntu.com. I was wondering if I did that, would it always be looking at old-releases.ubuntu.com when I ran apt-get update. – Jeramiah Harland Feb 8 '19 at 16:31
  • Yeah, the config in /etc/apt/sources.list etc is static. When you configure a specific URL there, that will not change back on its own. You should not have any old-releases.ubuntu.com links in there though as of now, as 14.04 isn't an old release yet. And once it reaches EOL (in a few months) you should rather upgrade to a still supported version than to convert to old-releases repositories. – Byte Commander Feb 8 '19 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.