E: unable to locate package libnlopt-cxx-dev

I am trying to download an app called phyx, which is necessary to use PyPhlawd (which is my final mission).

When running

sudo apt-get install git autotools-dev autoconf automake cmake libtool liblapack-dev libatlas-cpp-0.6-dev libnlopt-cxx-dev libnlopt-dev libnlopt0

(step 1 to install phyx in Linux), I only get the following:

[sudo] password for mmlapeira:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libnlopt-cxx-dev

So I tried lots of things:

sudo apt-get update
sudo add-apt-repository universe
... 

But nothing works, it won’t locate the package.

I am completely new on this, so please I need a step by step answer.

libnlopt-cxx-dev is in the default repositories of Ubuntu 19.04 and later. To install it open the terminal and type:

sudo add-apt-repository universe
sudo apt install libnlopt-cxx-dev
Answered By: karel