apt update
Reading package lists... Done W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted) 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)
CodePudding user response:
This seems to be a Problem with the Permissions of the Mentioned Directory the Directory owner would be set to root by default kindly switch as a root user or use the command in sudo mode which will help in resolving
CodePudding user response:
you do not have root to access the files. Try sudo apt-get update
instead
CodePudding user response:
clearly indicates that the filename is wrong:The file name your are trying to open via command. Also please provide the command you are trying to execute.
Go to the directory cd /etc/apt/sources.list.d/ and check the file name exist . Provide sudo to permit .
Meanwhile check for running apt-get processes: ps -A | grep apt
If multiple process exist then try to kill which is struck by using sudo kill
Clean up the lock files that you are struck with by : sudo rm /var/lib/dpkg/lock sudo dpkg --configure -a sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock
Then run sudo apt-get update