-2
$ sudo apt install snort
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

Then, I try

sudo dpkg --configure -a
[sudo] password for hill: 
Setting up firefox (59.0.1+build1-0ubuntu0.16.04.1) ...

then it hangs forever and the network is good. Does anybody know how can I fix this problem? Thanks

Yuber Hu
  • 1
  • 2

2 Answers2

0

This error shows that packages are broken or in past package installation was interrupted.

Try running :

apt-get -f install

It resolves unmet dependencies.

Abhishek Keshri
  • 3,074
  • 14
  • 31
  • I run `sudo apt-get -f install`, then I got `E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. ` So, I run ` sudo dpkg --configure -a`, then I got `... Setting up firefox (59.0.1+build1-0ubuntu0.16.04.1) ...` and it hangs again. – Yuber Hu Apr 10 '18 at 12:45
  • remove firefox and try again. Seems like firefox has got broken dependencies. – Abhishek Keshri Apr 10 '18 at 13:06
  • I run `sudo apt-get remove --purge firefox` and `sudo apt purge firefox` then I got `E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. `. And I try another command `rm -r ~/.mozilla`. But they don't have any effect. – Yuber Hu Apr 11 '18 at 13:13
0

Try sudo apt-get --reinstall install firefox. I got it from there.

user1415785
  • 342
  • 4
  • 13