4

I am having some issues. When I try to do sudo apt update or sudo apt upgrade, I get the attached error.

Comments
  • 6
    Just wait for the other process to finish.

    Wait... Did you really write duso 😄
  • 4
    Something else is using it. Either Ubuntu is updating in bg or it's bugged. Reboot your pc, if it persists you can delete the lock file. But try the other things first. More info on lock file removal:
    https://askubuntu.com/a/102084
  • 6
    sudo lsof /var/lib/apt/lists/lock

    -or-

    fuser /var/lib/apt/lists/lock

    Look at the process that's using the file, and chase its PID up the process tree with ps or top.

    I see lots of default stuff on your screen for Ubuntu, so I'm guessing you let Ubuntu run updates on its own. That's probably what's happening.
  • 4
    @electrineer I've waited a few hours. And, yes, I did write dsuo. It took me five minutes to figure out why it didn't work. Long day
  • 1
    I waited some more and it seems to be working. But now, I am getting this error when I run sudo apt upgrade
  • 1
    Did you by any chance have anything open that deals with updates or software installstion?

    If now legit just restart the computer and it will work.
  • 3
    Also, shutter is a good screenshot app. Better than a phone.
  • 1
    You can also delete the lock file 😛
  • 1
    1)Set the software updater gui to never check for updates.

    2)Enjoy
  • 0
    Just remove the lockfile!

    Can also happen when closing a terminal while doing apt-something.
  • 1
    @bahua thank you! This is like my third time actually using Linux. I've been trying to find replacments for software that I use on Windows
  • 1
    @cloverismyname

    If you make a script like this, you can assign it to a custom keyboard shortcut. I use alt-shift-4, so it's similar to the screenshot hotkey in macOS.

    #!/bin/bash

    TS=`date +%Y%m%d_%I%M%S%p_%Z`
    shutter -s -o ~/Desktop/screenshot-$TS.png -e
  • 1
    apt-get -f install
    Should fix it
  • 0
  • 0
    I am also getting this error: https://pastebin.com/TZRdXmSu/
  • 1
    @cloverismyname Well, that's not good. Looks like you're failing on a post install script maybe. It's fixable, but not something I can walk you through here. Libc is pretty important on a Linux system, so don't be surprised if some stuff doesn't work.

    I'd suggest using dpkg to fully remove the problematic Libc package and then reinstall it. Good luck!
Your Job Suck?
Get a Better Job
Add Comment