Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am currently trying to download Linaro Lava onto my VirtualMachine. When I do this command I am getting a permission denied error:

echo 'deb http://people.linaro.org/~neil.williams/ubuntu/ trusty main' > /etc/apt/sources.d/lava.list

Some quick help on this would be appreciated

share|improve this question
1  
put "sudo " in front of it please. –  Rinzwind Jun 18 at 15:48
    
Have you tried adding sudo first? or to log in as root? –  Alvar Jun 18 at 15:48

2 Answers 2

Your command should be,

sudo sh -c "echo 'deb http://people.linaro.org/~neil.williams/ubuntu/ trusty main' > /etc/apt/sources.d/lava.list"

Try to run the command in a subshell or otherwise you will get an permission denied error.

share|improve this answer

I guess, there are 2 things:

  1. I guess you're trying to run the command as the normal user, but only the root user can create a file there. So you should run the command with a sudo su beforehand to gain root privileges.
  2. You're putting it in /etc/apt/sources.d/lava.list, but it should be /etc/apt/sources.list.d/lava.list as apt usually checks the sources.list.d directory. But I'm not 100% sure whether that changed for Linaro Lava.

So, check

ls /etc/apt/

and if there's the directory sources.list.d then run:

sudo su
deb http://people.linaro.org/~neil.williams/ubuntu/ trusty main' > /etc/apt/sources.list.d/lava.list

but if there's the sources.d directory, then run:

sudo su
deb http://people.linaro.org/~neil.williams/ubuntu/ trusty main' > /etc/apt/sources.d/lava.list
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.