This error shows up when your Sources.list doesn't have the information about the package you're trying to install.
If you're too new and don't know what is sources.list.
Apt uses a file that lists the 'sources' from which packages can be obtained. This file is located at /etc/apt/sources.list.
Possible steps to fix your issue :
- Make sure that the package you want to install actually exists or not.
- Run
sudo apt-update
to update sources.list, then try installing package again.
- If even after step 2 your problem isn't solving, generate a sources.list using this online website : https://repogen.simplylinux.ch/
You can also try add repositories (main, universe, restricted, multiverse) manually by using the following commands
sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse
apt-cache search [name]
or part of name. Or use the on-line search for package name : https://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names – Knud Larsen May 16 '18 at 23:14sudo apt update
? Welcome to Ask Ubuntu. – chili555 May 16 '18 at 23:34