On Sat, Feb 14, 2015 at 01:22:52AM +1300, Richard Hector wrote:
> On 13/02/15 16:54, Jack Chuge wrote:
> 
[cut]
> 
> Alternatively, when you used this line:
> echo "deb ..." | tee /etc/apt/...java.list
> 
> did you put sudo in front of tee as well? Like this:
> sudo echo "deb ..." | sudo tee /etc/apt/...java.list

There's no reason to run "echo" as root. Most unprivileged users should
be quite capable of echoing text.

> 
> Otherwise, I think tee won't run as root, and therefore won't be able
> to write to the file. That might be why it couldn't find the packages.
> 
> I think I'd use the first option - get a root shell.
> 
> Richard
> 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: https://lists.debian.org/54ddec9c.5040...@walnut.gen.nz
> 

Attachment: signature.asc
Description: Digital signature

Reply via email to