0

I get some problems with Ubuntu... And I need to reinstall he..

I can't enter in Ubuntu, I only can enter in full terminal.

I try reinstall with the command:

sudo apt-get install --reinstall ubuntu-desktop

And I get:

Errors were encountered while processing:
avg2012lms

I try very commands like: sudo dpkg -R -P avg2012lms ; sudo apt-get remove --purge avg2012lms

Nothing works, I try to kill avg process.

Someone can help please?

4
  • Another thing i can't install nothing he just make: "Errors were encountered while processing: avg2012lms"
    – Ch3HP
    Sep 26, 2015 at 18:21
  • How have you installed avg2012lms? as deb? from here avg.com/eu-en/download-2012.prd-alb
    – A.B.
    Sep 26, 2015 at 18:55
  • Yes i installed in avg.com/eu-en/download-2012.prd-alb
    – Ch3HP
    Sep 26, 2015 at 20:06
  • Edit your question and add the output of apt-cache policy avg2012lms, the output of find /opt -type d -iname '*avg*'
    – A.B.
    Sep 27, 2015 at 8:42

1 Answer 1

0

This is the full error message and you gave us only two lines (bold in the message below)

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  avg2012lms*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 157 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 515099 files and directories currently installed.)
Removing avg2012lms (2012.1795) ...
Failed to stop avgd.service: Unit avgd.service not loaded.
invoke-rc.d: initscript avgd, action "stop" failed.
dpkg: error processing package avg2012lms (--purge):
 subprocess installed pre-removal script returned error exit status 5
Errors were encountered while processing:
 avg2012lms
E: Sub-process /usr/bin/dpkg returned an error code (1)

A similar error might see when you install the package. In other words, the whole thing was not running.


Therefore

Open the file /var/lib/dpkg/info/avg2012lms.prerm

sudo nano /var/lib/dpkg/info/avg2012lms.prerm

and replace this

case "$1" in

    remove|deconfigure|upgrade)

       if which invoke-rc.d >/dev/null 2>&1; then
           invoke-rc.d avgd stop
       else
           /etc/init.d/avgd stop
       fi

with this

case "$1" in

    remove|deconfigure|upgrade)

#       if which invoke-rc.d >/dev/null 2>&1; then
#           invoke-rc.d avgd stop
#       else
#           /etc/init.d/avgd stop
#       fi

and now again

sudo apt-get remove --purge avg2012lms
sudo apt-get install --reinstall ubuntu-desktop

Finally you should search running avgd processes and kill them.

9
  • Only 1 question where i save?
    – Ch3HP
    Sep 27, 2015 at 13:49
  • Sorry, I don't understand your comment.
    – A.B.
    Sep 27, 2015 at 13:56
  • When i replace, i need to save the file he say to make: ^O ... But not work xD
    – Ch3HP
    Sep 27, 2015 at 14:03
  • use sudo nano /var/lib/dpkg/info/avg2012lms.prerm as I said in my answer. You can save the file only as root.
    – A.B.
    Sep 27, 2015 at 14:05
  • Sorry its my first time using ubuntu... I do not understand how to make this... Can you help me?
    – Ch3HP
    Sep 27, 2015 at 14:07

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.