Score:-2

sudo apt-get update && apt upgrade tried to run this command and got a error

va flag

I run the command apt update and upgade but it gave this error .I tried the other methods like dpkg other fixes, but it did not get fixed. Also used grep command also

the error ss

guiverc avatar
cn flag
Does this answer your question? [E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)](https://askubuntu.com/questions/1208449/e-could-not-open-lock-file-var-lib-dpkg-lock-frontend-open-13-permission-d)
guiverc avatar
cn flag
You're attempting to run `apt upgrade` without `sudo`.... You first command included the `sudo`, but the second command you provided did not.
Artur Meinild avatar
vn flag
^^^ guiverc is correct here..
Score:4
cn flag

Your command

sudo apt-get update && apt upgrade

contained two commands

  1. sudo apt-get update

ie. here you elevated the privileges for your first apt-get update command.

If the first commands was successful (&& operand) you told the machine to run a second command

  1. apt upgrade

this command you told the system to run with normal permissions; thus the permission denied error you received. The sudo for the first command you gave was only for that first command, not both commands you entered due to the manner in which you wrote it.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.