Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Apt-get errors after aborting command  (Read 271 times)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6261
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Apt-get errors after aborting command
« on: September 28, 2018, 01:42:08 AM »

I hit control-Z in the middle of a mistaken apt-get install command and it has left a right old mess. If I try to remove the packages that it half-installed I get all kinds of errors relating to other packages that I have never heard of that were dependencies. I managed to fix a load of lockfile errors, but there is still more evil and some of these packages cannot be installed or removed now. An attempted remove operation on them tells you to install the first, and then that fails anyway.

Any ideas for a clean solution?
Logged

burakkucat

  • Global Moderator
  • Senior Kitizen
  • *
  • Posts: 23883
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Apt-get errors after aborting command
« Reply #1 on: September 28, 2018, 03:28:35 PM »

<Ctrl-Z> would have only paused, i.e. suspended, the process. It could have been resumed with a fg command.  :(
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6261
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: Apt-get errors after aborting command
« Reply #2 on: September 28, 2018, 03:53:54 PM »

After I corrupted the whole database I could not think of any way of completely blitzing it and resetting everything, so no further apt-get operations worked properly. Not a good advert for Ubuntu, one mistake and the system is rendered unusable for good. They need a proper database with transactions, commit, roll-back that sort of thing. Could have been a power cut. Scary.
« Last Edit: October 08, 2018, 12:22:29 AM by Weaver »
Logged

parkdale

  • Reg Member
  • ***
  • Posts: 229
Re: Apt-get errors after aborting command
« Reply #3 on: October 07, 2018, 10:19:40 AM »

sudo apt-get clean  cleans out any cached debs
sudo apt-get autoclean  removes any partial installs
sudo apt-get install -f  fixes any broken packages
sudo apt-get install --fix-missing   as it implies...

Follow up by do apt-get update

Hope i'm not teahing anyone to suck eggs ... :)
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6261
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: Apt-get errors after aborting command
« Reply #4 on: October 08, 2018, 12:22:57 AM »

Perfect. That is just what I needed. Many thanks.

I got one error out of that lot:

W: Problem unlinking the file .nfs000000000004078500000c61 - pkgAcquire::Clean (16: Device or resource busy)

I found the cause of that - for some reason there was some other process in existence that looked like it was running a stuck instance of apt-get or something. I could not kill it not matter how I tried, so I rebooted the machine. And error message gone.
« Last Edit: October 08, 2018, 05:58:52 AM by Weaver »
Logged
 

anything