apt-get update resulted in "Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)"
No response to my post yesterday yet. I am thinking it was too long.
This thread contains one part of the earlier thread. One step at a time,right ? Maybe fixing this is all I need.... maggie@linux ~ $ apt-get update Reading package lists... Done E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) maggie@linux ~ $ I found a possible fix online and tried it maggie@linux ~ $ sudo apt-get update && sudo apt-get upgrade [sudo] password for maggie: Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease Hit:2 http://archive.canonical.com/ubuntu focal InRelease Hit:3 https://repo.skype.com/deb stable InRelease Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Ign:6 http://packages.linuxmint.com uma InRelease Hit:7 http://packages.linuxmint.com uma Release Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Fetched 214 kB in 2s (87.0 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. maggie@linux ~ $ There are no errors, yet no fix either. I ran apt-get update again, and it was identical to the first time above... I found there are some root fixes possible, but I also read one false move in root and I could ruin my system. #2 Question What is the significance in the E: and the W: ? #3 And how do I get my terminal results in their own box in this thread ? I can use some help to fix this. Any takers ? :) |
You have to be root or use sudo to update.
|
sudo apt-get update sudo apt-get upgrade
Welcome to the world of Linux. I love it, everything on my 7 year old laptop just works.
I'm confused, you got errors running apt-get as maggie but when you used sudo everything worked normally. I don't see your problem. To paste terminal output into a post use {code} paste contents {/code}. Use [] instead of the {} I used. You can highlight the contents of the terminal session with your mouse and then middle click in the post to paste the terminal contents. --glenn |
craigevil,
Thanks for responding. "You have to be root or use sudo to update." So, sudo commands are safer then. Good to know. And the "apt-get update" command requires I be root. Got it. Not ready to be root yet lol ! When I used sudo apt-get update && sudo apt-get upgrade I have questions about the result Fetched 214 kB in 2s (87.0 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Since 214kb were fetched, why is it 0 upgraded ? And is the combined sudo apt-get update && sudo apt-get upgrade the best command to get both update and upgrade all at once ? Finally, is using update manager alone pretty reliable ? PsychoHermit,Sorry, I did not follow/ " use {code} paste contents. " Where do I find "code" ? And what does "ign" stand for in #6 on $ sudo apt-get update && sudo apt-get upgrade ? Thanks to both of you !!! |
Quote:
Remove that idea from your mind please, because it is wrong. Quote:
Quote:
BTW, this is OP's earlier thread. |
I always set up exactly one user which is "an administrator" – that is, "a member of the wheel group." Every other user, including all of the ones that I daily use, are not a member of that group and therefore do not have the power to gain root access no matter how hard they may try.
Anytime I need to put on blue tights and fly around, I walk into that telephone booth. I use it for no other purposes. You will never guess its random password, and you cannot log into it remotely even if you did know the magic word. "Computers are terrible at knowing when to say 'yes,' but they are wonderful at saying 'no.'" Therefore I use this principle of least privilege on a daily basis. If you sneak some program into my account and try to run it on my behalf to do nasty things to my system, you will find that it doesn't work – my user does not have the power. And, if you try to snoop around into other users' /home/xxx directories, you will find that you have no access to them. |
Hi magster,
Concerning privileges / sudo / root :
Finally, as others have mentioned, your "update" and "upgrade" commands seem to be functioning correctly. "Update" simply updates your local package database (what is available in the online repositories - as mentioned, this is the small amount of data downloaded) and "upgrade" will install any new versions of packages already installed on your system (in your case, you don't have anything to upgrade yet). Hope this helps - let us know if you need further help. Cheers, Rick |
Quote:
|
Ondoho,
I did not realize sudo DOES have root priveleges. Not as much as full root priveleges. Basically, I Could inadvertantly mess up my computer more easily using full root,I hear what you are saying though... THanks. |
sundialsvcs,
Thanks for your input. For now, I feel safer using sudo commands and not even having full root control. Is there any reason (safety wise) you see that I ought to set it up anyway so I could have full root control b4 I plan to use it ? THanks. |
shruggy,
I guess to use su you must have a password. One different from my sudo one....THanks for that info. :) |
I posted a response in your other thread https://www.linuxquestions.org/quest...ma-4175701820/ as to why you might see the posted error.
Yes, it helps to only post one question in a thread and posting multiple threads on the same topic does cause confusion... |
Rickkkk,
Thanks for your clear explanations ! "Update" simply updates your local package database (what is available in the online repositories - as mentioned, this is the small amount of data downloaded) That explains why when I see "fetched # kB" in an update, I do not see it reflected at the screen bottom 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. THat is only actual UPDATES that will be listed there. Is that correct ? Now I understand that ! If in the future I post something, and there is no feedback, or I do not understand what a person replies, is it possible I could message you somehow through this platform? If you are okay with that, how would I do that ? THanks sooo much ! Maggie |
Quote:
Cheers, Rick |
Hi Maggie,
Let's try it again. To post something and preserve the formatting you have to use the code tags. I'm substituting {} for [] because using [] would not be visible to you. It would interpret the code tags and make a code block. {code} Pasted terminal output. {/code} To copy and paste terminal output into your browser you highlight the terminal output with your mouse and then go to your browser and click the middle mouse button. Saves a lot of typing. Update is a script on my machine that does Code:
sudo apt-get update && sudo apt-get upgrade Code:
glenn@PsychoBox:~$ update --glenn |
All times are GMT -5. The time now is 04:45 AM. |