0

Running Ubuntu Server 18.04 LTS, I'm trying to install a project that I'm currently working on. The problem is that the setup requires several commants, therefore I have created a .sh file to make it easier for any other setting the project up. But i have encountered a problem when adding a new URL to install packages from. To start the script, I run

blueprint@ubuntu:~$ bash install-project.sh

A bit down in the file, there is the following line:

sudo add-apt-repository ppa:builds/sphinxsearch-stable

which seems to be working fine, I could not see any error messages. But the next line:

sudo apt-get update

gives the following error:

Hit:1 http://se.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://se.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://se.archive.ubuntu.com/ubuntu bionic-security InRelease
Ign:5 http://ppa.launchpad.net/builds/sphinxsearch-stable/ubuntu bionic InRelease
Err:6 http://ppa.launchpad.net/builds/sphinxsearch-stable/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/builds/sphinxsearch-stable/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

As far as I can see, when running sudo apt-get install ... on any sphinxsearch packages, they seem to install, so that is not my problem.

But it stops the bash file to continue running (and there are several more commands to run after that) which is really annoying. The only solution I have come up with so far is to create two different .sh files, one for before the error and one for after. But it seems like a stupid and cumbersome way to do it.

Does anyone know if there is any way to for example suppress the errors from apt-get update so that the bask file does not stop there? Or if there is any way to make the bash file not stopping on errors?

2
  • @user535733 not really since I need to use that exact PPA. It's a huge project (and we ar many many developers on it, so removing the PPA or the package is not an option. As far as I can see, there is only a very old version of the PPA and package, but it's needed in the project (not my decision). Also, As I don't have Gnome, I can't use the package manager to change version of the PPA.
    – BluePrint
    Mar 12, 2020 at 20:53
  • So basically, you want to suppress the errors, and allow the script to continue? Maybe something like askubuntu.com/questions/258219/… ? Mar 17, 2020 at 19:09

1 Answer 1

0

That's an unwise policy decision imposed upon you. Sorry.

That particular PPA is compatible with Ubuntu 12.04, and hasn't been updated in eight years.

Advice: Use a web browser to pull the package yourself from the PPA (it's here). There is purpose to adding the PPA as a source, since it will never be upgraded.

Then install it using from your desktop using sudo apt install /path/to/deb_file.deb

And let your project know that building upon that package instead of something newer seems a bit of a dead end.

2
  • 1
    Thanks, but this doesn't really answer my questions: Is there any way to prevent bash from stopping when encountering this error?
    – BluePrint
    Mar 13, 2020 at 9:11
  • No: An 'Error' is a terminating failure. A 'Warning' is a non-terminating failure. There is a flag (--force-depends) to get apt to covert dependency errors into warnings...but that's not the problem you have.
    – user535733
    Mar 13, 2020 at 14:01

Not the answer you're looking for? Browse other questions tagged .