3

When I ran software updater, everything went fine except for Avahi DNS config Tool. It told me:

Package operation failed. Installation or removal of package failed.

I have tried:

apt -y update
apt-get dist-upgrade
apt-get clean
apt -y autoremove
4
  • fixit7: Please update your post with details as to version of Ubuntu you are running. This just happened to me too on my Ubuntu system: i.imgur.com/CGvrqdF.png running Ubuntu 17.10 (so is in need of an upgrade anyhow). And by the way, a huge defect here is that there is no way for the user to see the specific error from that popup window, thus forcing you to play games with apt-get etc. – bgoodr Jul 13 '18 at 15:04
  • Run "sudo apt update && sudo apt upgrade" to see more specific error messages regarding the update process, and post these here. – vanadium Jul 13 '18 at 15:17
  • Welcome to Ask Ubuntu! Could you please add a little more detail? What exactly did you do, what did you expect to happen and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. Please edit your post to add information instead of posting a comment. (see How do I ask a good question?) – David Foerster Jul 14 '18 at 18:35
  • It's been a long time since I posted the question. The problem is resolved but I can not remember what I did. Thanks for all the responses. – fixit7 Jul 15 '18 at 19:42
1

First command is worth to run:

sudo dpkg --configure -a

Then step by step:

sudo apt autoclean
sudo apt clean
sudo rm /var/lib/apt/lists/* -vf
sudo apt update
3
1

I searched for the error message that I kept encountering at https://gist.github.com/bgoodr/d77d997fe02af47c3a837e9b94256897#file-transcript_log6-txt-L26 which was:

dpkg: error processing archive /var/cache/apt/archives/avahi-dnsconfd_0.6.32-1ubuntu1.1_amd64.deb (--unpack):

and found the answer at https://askubuntu.com/a/1022548/340383 that has the final commands I used that fixed the problem.

Package operation failed is the result.

Now running Software Updater finishes successfully and is requiring a reboot.

0

A few other things to try:

sudo apt-get --fix-broken install

That normally fixes partial or broken installations. If it fails, add the output messages to your original question.

1
0

This probably mean something was stuck in "dependency hell" or dpkg just messed up somewhere. To fix this try these commands.

Try forcefully deleting and refreshing your package lists with new remote ones.

sudo rm /var/lib/apt/lists/* -vf
sudo apt update

Once done, try cleaning and removing unnecessary files & packages.

sudo apt autoclean
sudo apt clean
sudo apt autoremove

Remove the package you are having trouble with.

sudo apt remove <package>

Next, try getting dpkg to resolve the issue on it's own.

sudo dpkg --configure -a

Next, try getting apt to resolve the issue on it's own.

sudo apt -f install

Last, try installing it again.

sudo apt install <package>

You could help all of us by running "lsb_release" and telling us which version of Ubuntu you are running, and also provide the contents of your /etc/apt.d/sources.list.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.