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?