0
When executing the command sudo apt-get install apache2
the following error is returned:
Os pacotes a seguir têm dependências não satisfeitas:
apache2 : Depende: apache2-bin (= 2.4.7-1ubuntu4.9) mas não vai ser instalado
E: Não foi possível corrigir problemas, você tem pacotes mantidos (hold) estragados.
How to solve the problem?
I have tried the following commands to repair broken packages and nothing worked:
sudo apt-get clean && sudo apt-get update
dpkg --configure -a
sudo apt-get install -f
The version of Ubuntu is the 14.04 LTS.
Follow the file /etc/apt/sources.list:
deb http://pt.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://pt.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb http://pt.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty universe
deb http://pt.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb http://pt.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://pt.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://pt.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://pt.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
@Guilhermenascimento added the data to the question.
– Filipe Moraes
@I’ve done so much that I can’t really remember what I did! I have already removed and reinstalled apache2 / php several times without problems, but now this problem occurs.
– Filipe Moraes
@Guilhermenascimento.
– Filipe Moraes
@Guilhermenascimento no, no error occurs.
– Filipe Moraes
This error occurred: Failed to get http://security.ubuntu.com/ubuntu/dists/trusty-security/main/i18n/Translation-en Hash verification code does not match
– Filipe Moraes
@Guilhermenascimento ok I did this, the error I posted in the comments does not occur but still gives the error I entered in the question.
– Filipe Moraes
@Guilhermenascimento solved the problem. In addition to using synaptic (thanks for the tip), I used the command "sudo aptitude install apache2".
– Filipe Moraes
put as answer, even if very simple the tip of
aptitude
is very powerful, I didn’t even remember this command :/– Guilherme Nascimento
@Guilhermenascimento I did what you posted in the reply too and in the end I did the
aptitude
. You can supplement your answer with this tip, it gets more complete, so mark as certain.– Filipe Moraes