Forums

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

When I try to do : sudo apt-get install <package name> This is the response : 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?

I tried to delete lock : sudo rm /var/lib/dpkg/lock Response: sudo: unknown user: root sudo: unable to initialize policy plugin

How should I go about this? Thanks!

You can't use apt-get at all on PythonAnywhere.

What then?

depending on what you are trying to install, you may for example be able to build it in your own homedir (if you know how to do that)

can u please elaborate how to do

The documentation for the software should include instructions for building it from source. That will also then usually contain instructions for how to change the installation path.

I am not able to start MySQL or bash console. It is giving error "unable to lock var/lib/apt/lists"

Pl suggest to get rid of the problem

Could you send more details to support@pythonanywhere.com, maybe screenshots?