This happens when you try to install a package about which APT does not have any idea. When you add software sources, you need to do an apt-get update
so that your system APT's database is updated with all the packages on the repositories listed in the software sources lists.
Then when you try to install any package, APT checks the package name in it's database, finds it and checks the name of the repo from where it got it. It then downloads the package from that repo.
This means of all the repositories listed in your software sources, none of them have the package named munin-memcached
. I checked again and it is not available in official Ubuntu repos.
After a bit of googling I found that it is available in this PPA: chris-lea/munin-plugins
Add this PPA and install the packages at your own risk. I do not know this person.
To add the PPA, issue the below command:
sudo add-apt-repository ppa:chris-lea/munin-plugins
To install package munin-memcached
, issue the below command:
sudo apt-get update && sudo apt-get install munin-memcached
The main problem is missed /etc/apt/sources.list
.
You can recreate it with:
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs) main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-backports main universe restricted multiverse
EOF
Then run
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install apache2
Best Answer
The package
libpng12-dev
was dropped after 16.04. It's been gone a long time.Try
libpng-dev
.