-1

Im a beginner with Ubuntu, I had some issues with my laptop and my friend came in to "fix" them. Since these issues are fixed, im now forced to use sudo before every single command I want to use.

For example, if I want to use the simple apt-get update, it gives me this error (sorry some of the info are in french):

W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Impossible d'ouvrir le fichier verrou /var/lib/apt/lists/lock - open (13: Permission denied)
E: Impossible de verrouiller le répertoire /var/lib/apt/lists/
W: Problème de suppression du lien /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problème de suppression du lien /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

If I run sudo apt-get update, I get no problem and the commands work. Im the only user and I got the authorisation so I shouldn't have to sudo everytime (I used to not have bafore).

I tried some fixes I found on the net such as deleting the files listed above without any success.

2

The simple apt-get command requires sudo because it requires superuser access to change system files.

You should use sudo apt update and sudo apt upgrade to install updates. There is no recommended or standard way to enable this change without sudo.

  • Alright I wasnt aware, I didnt have to use sudo before that. Since I have to do that I also encountered problem with some other program. For example Im working on some modificaiton of cado-nfs.gforge.inria.fr . If I dont use sudo, the program stop working at some point. Before the changes it would run without problems – Nicolas Berveglieri Jan 12 '18 at 5:50
1

The "apt-get" command has to be run with sudo and I do not know how you could have run it before without sudo. Probably the best way to find out what your friend did to "fix" your laptop is to ask them.

  • This is not true for all cases: apt-get source package only searches and downloads the sources of the selected package into the current directory. If you have access rights there, there is no need to use sudo. – Marc Vanhoomissen Jan 12 '18 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.