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.

So I'm trying to install shiny server for the R programming language on Ubuntu 12.04, using the information available at this page on the program's github.

However, when I get to this step:

# Install Shiny in system-wide library
sudo su - -c "R -e \\"install.packages('shiny', repos='http://cran.rstudio.com/')\\""

I get the following:

bash: syntax error near unexpected token `('
share|improve this question

1 Answer 1

up vote 8 down vote accepted

The two " characters are cancelling each other out at the beginning, I believe, because the quotes are incorrectly escaped. I'm not certain why they have \\" (which is interpreted as an escaped \ character with an unescaped " after that, and not an escaped " character) instead of \" which is the proper way to escape the quote, but that likely is the cause of this problem.

Try using this instead, it may work:

sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""

I have done some looking into this. The instructions that were initially provided for this in the GitHub repository for the software have been marked as "Obsolete".

This is the installation instructions that they now refer to. If you are running into this issue, you should not be using the documentation on the GitHub repository, and should be using the new instructions instead.

share|improve this answer
    
This worked perfectly! Thank you. I'll check the box in 9 mins. when it let's me. –  Jonathan Ross Charlton Nov 26 '13 at 1:29
1  
@JonathanRossCharlton glad to hear this worked! I opened up an issue with the project on Github specifically identifying that the command incorrectly escapes the quote, triggering a syntax error, and I also pointed them to this question/answer so they can see why I noticed this. This way they can fix this for others so that this doesn't happen in the future :) –  Thomas W. Nov 26 '13 at 1:44

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.