software center problem with terminal - ActionParsnip if poss

Asked by Jo Sharpe

I reinstalled software center using terminal, all going well until suggested update to iron out problem, below is what has happened, and I have no idea how to proceed.
Any advice would be super.
Kindly,
Jo

jo@jo-701SD:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

EDITED QUESTION, UPDATED BELOW:
Thanks for speedy response. I have followed your instructions (sodu-i did not do anything, did not recognise the command) but I did try using sodu before apt...etc...and what you see below is the result!

Reading package lists... Done
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/restricted i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
jo@j

Again I tried what it suggests...see below:

jo@jo-701SD:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
jo@jo-701SD:~$

Any ideas, before I lose will to live?!! No, love it really, just really miss software centre, although I have a feeling I may not need to run that command at all....I will have a look

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Solved by:
Jack-Benny Persson
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Jack-Benny Persson (jackbenny) said :
#1

It seems your not runnig as root (sudo). Try again but with "sudo apt-get update". If your doing many commands in a row that require root priviledges you can type "sudo -i" for a "root shell", whereas -i stands for interactive.

Revision history for this message
Jo Sharpe (im-jo-s) said :
#2

Thanks for speedy response JB. I have followed your instructions (sodu-i did not do anything, did not recognise the command) but I did try using sodu before apt...etc...and what you see below is the result!

Reading package lists... Done
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages)
W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/restricted i386 Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
jo@j

Again I tried what it suggests...see below:

jo@jo-701SD:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
jo@jo-701SD:~$

Any ideas, before I lose will to live?!! No, love it really, just really miss software centre, although I have a feeling I may not need to run that command at all....I will have a look, ty vm JB

Revision history for this message
Jo Sharpe (im-jo-s) said :
#3

Thanks Jack-Benny Persson, that solved my question.

Revision history for this message
Jo Sharpe (im-jo-s) said :
#4

See comment, still in trauma!

Revision history for this message
Best Jack-Benny Persson (jackbenny) said :
#5

Np, glad to help!

For "sudo -i" there should be a space in between sudo and the "-i". Also remember to be careful when your in an interactive root shell.

Looking at your comment it seems that somehow you have duplicate entries in your sources.list file. Check out your /etc/apt/sources.list file with your favorite text editor, like gedit. Remember that you need to "be root" to edit that file, so run "sudo gedit /etc/apt/sources.list" and then comment out any duplicate lines by putting a # sign before it. Save it, and then run "sudo apt-get update" again. Maybe that solves your problem.

Revision history for this message
Warren Hill (warren-hill) said :
#6

There is a troubleshooting procedure here
https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

Some times this fixes everything by its self. But if you get any errors post the whole response back here: do not open a new question. We will be able to help you.

Revision history for this message
Jo Sharpe (im-jo-s) said :
#7

Thanks Jack-Benny Persson, that solved my question.

Revision history for this message
Jo Sharpe (im-jo-s) said :
#8

Software centre is back, running nicely, however I believe the fact that my unit crashed and physically died on me four times in a row very quickly, when I finally switched it on it booted from recovery, never done that before! Heigh ho!
Cheers guys x