Jump to content

orange pi one how do I get permission to update?


renky

Recommended Posts

orange pi one desktop

apt-get update

apt-get upgrade

 

https://docs.armbian.com/User-Guide_Getting-Started/

 

I cannot update and upgrade.

I get these messages
 

$ apt-get 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)

$ apt-get upgrade

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?

$

Makes no difference if I write sudo first or run su.

 

How can I update? Thanks.

Link to comment
Share on other sites

You need to be root --> # at the command prompt (which you should get after su and the root-password), because as user you cant 

apt update & upgrade.

 

Check the user with the command id

 

If you running a desktop environment you also have to close something like the software-center or graphical updater.

 

If only apt update does work then wait for the end of the "daily update" :)

use the command ps -ef|grep apt

to see if apt is working (this is setting the lock file /var/lib/dpkg/lock).

 

When apt has ended its work (only the grep for apt is shown)

root# ps -ef|grep apt
root      3536  1495  0 17:34 pts/0    00:00:00 grep apt

 then you should be able to

apt upgrade

Link to comment
Share on other sites

Use sudo before your commands.
sudo apt-get update && sudo apt-get upgrade

 

And when I get : E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
Then I do,

sudo rm /var/lib/dpkg/lock
 

After that it works. Don't know if that's the right way, but it works.

Link to comment
Share on other sites

4 hours ago, NicoD said:

Then I do,

sudo rm /var/lib/dpkg/lock

 

Not exactly the best way :) There could be some automated apt process with some purpose in the background. For example, we run index updates (apt update) every 21 days which means usually also at the first boot. This is getting some changes lately ... but on most images, it goes that way. 

The best tactic is to wait for a minute that index is updated, then proceed with apt get ...

Link to comment
Share on other sites

As I wrote

sudo apt-get update

sudo apt-get upgrade

does not work either.

 

Nor does

su + enter.

 

Is it a common error?

Being able to update should be a mundane task.

 

 

 

 

 

Link to comment
Share on other sites

16 minutes ago, renky said:

Nor does

su + enter.

What does the OPi One after si+enter?

Doenst it ask for the root password.
Did you create at the first boot of armbian a root password ( from 1234 to your password) and a new user?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines