Announcement

Collapse
No announcement yet.

confused about apt vs apt-get ... and locks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    confused about apt vs apt-get ... and locks

    The data:

    $ sudo apt-get update
    ...

    Fetched 193 kB in 1s (247 kB/s)
    Reading package lists... Done
    E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

    Yes, I was root.

    $ sudo apt update
    ...

    Reading state information... Done
    10 packages can be upgraded. Run 'apt list --upgradable' to see them.
    E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

    The next time I ran it with apt-get, it worked fine. So apt seems to fix something that apt-get does not like. Does this mean I should always use apt for update? There's also pkcon. I do not like discover, I want to see what is happening.

    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Being locked means that another instance of apt is already running.-- probably a background update check that Ubuntu does on a regular basis. Or Discover was open and checking for updates. Things like that. It has finished by the time you used apt.

    Apt vs apt-get there technically isn't a difference but there can be very slight differences that are unlikely to be noticed very often.

    The rule of thumb is that apt-get is for scripting as its actions haven't changed in forever and likely won't, while just apt is both the most current method and is preferred for normal end users.

    Here is a bit of TMI on the topic that explains the differences.

    https://itsfoss.com/apt-vs-apt-get-difference/

    Comment

    Users Viewing This Topic

    Collapse

    There are 0 users viewing this topic.

    Working...
    X