installer icon indicating copy to clipboard operation
installer copied to clipboard

Permission denied on Deb installation on Debian or Ubuntu

Open ricardocassiano04 opened this issue 2 years ago • 4 comments

Hello!

Unlike apt (step 1) command, mkdir (step 2) and tee (steps 2 and 3) commands will not ask for sudo password.

So the repository will not be configured.

https://adoptium.net/installation/linux/

Congratulations for your good job!

ricardocassiano04 avatar Feb 28 '23 13:02 ricardocassiano04

@ricardocassiano04 So you are saying that mdir and tee need to be run as sudo?

karianna avatar Mar 01 '23 00:03 karianna

Yes.

ricardocassiano04 avatar Mar 01 '23 11:03 ricardocassiano04

I think in the "Tip" it already states : "On most Linux systems you must have superuser privileges to install packages such as Temurin. You may need to prefix the commands below with sudo for them to succeed."

zdtsw avatar Mar 13 '23 19:03 zdtsw

So you are saying that mdir and tee need to be run as sudo?

Yeah the tee is the bit that writes to files in /etc so needs to be run as root.

Unlike apt (step 1) command,

@ricardocassiano04 I'm curious - are you saying the the apt install will prompt for the password if it's run as non-root? That doesn't usually happen in my experience - which distribution+version is that happening on?

On Ubuntu 22.04 it doesn't seem to try to prompt me and just fails:

$ apt install -y wget apt-transport-https
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
$ 

sxa avatar May 16 '23 12:05 sxa