When I try to install apache, I have got the following error.
sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Depends: apache2-utils (>= 2.4) but it is not going to be installed
Depends: apache2-data (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Recommends: ssl-cert but it is not going to be installed
golang-1.6 : Depends: golang-1.6-go (>= 1.6.2-0ubuntu5~16.04.4) but it is not going to be installed
golang-1.6-doc : Depends: golang-1.6-go but it is not going to be installed
golang-go : Depends: golang-1.6-go but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I have tried running
sudo apt-get update
This also did not fix the issue.
Can anyone help me to understand this problem?
2
Answers
I just removed golang completely.
sudo find /var/lib/apt/lists -type f |xargs rm -f >/dev/null
sudo dpkg --remove golang-go
This link was useful : https://askubuntu.com/questions/252777/how-can-i-resolve-dpkg-dependency
After this, I did update. Then apache2 got installed successfully.
Thanks for all the responses!!
Try: