Setting up your own shiny-server / rstudio-server on a Raspberry Pi 3B+

rstudio-server
shiny-server
rasperry-pi
#22

Oh sorry, I'm running the cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Debug command.

log file Makefile:126: recipe for target 'cmTC_75f91/fast' failed

0 Likes

#23

Well, it appears that there is a missing dependency, so try to run ./install-dependencies-debian --exclude-qt-sdk again and check if throws any warning message

That script comes from the github repo so it is possible that has been modified lately and that it is including a new dependency that needs to be manually installed on raspbian

1 Like

#24

That script comes from the github repo so, ... most likely something I did :slight_smile: I get things horribly wrong all the time lol. I used to be a nurse and some how tricked the uni into letting me do a master in computer science stuff, so stuffing up is my middle name.

Just to be sure, can I confirm which directory I should be when I first download rstudio.git via;
sudo git clone https://github.com/rstudio/rstudio.git

Btw, do you want me to post new threads for questions or keep it to this thread?

0 Likes

#25

It really doesn't matter in which directory you are, as long as you are executing commands as superuser, if you are at your home directory it's ok.

EDIT: I take it back, you need to be here /home/pi

About the new thread, I'm not sure, maybe @EconomiCurtis can tell us if it's ok to keep this conversation here.

0 Likes

#26

The only reason I am confirming is that, cmake does not need to performed in /usr/local/src like the generic make. Is that correct?

0 Likes

#27

Thanks again @andresrcs documentation is really good. There are a few changes that could be made as things have moved or changed. Got to love developers.

1 Like

#28

Feedback and updates to this guide are always welcome, so tell me about it.

0 Likes

#30

You also may want to add permissions to swap drive so that it can only be accessed by root user. You can do this afterwards by first going,

sudo /sbin/swapoff /var/swap.1 
sudo chown root:disk /var/swap.1 # add root to swap
sudo chmod 0600 /var/swap.1 # add 0600 permission 
sudo /sbin/swapon /var/swap.1`.

The full code:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=3072
sudo /sbin/mkswap /var/swap.1
sudo chown root:disk /var/swap.1 # add root to swap
sudo chmod 0600 /var/swap.1 # add 0600 permission 
sudo /sbin/swapon /var/swap.1
sudo sh -c 'echo "/var/swap.1 swap swap defaults 0 0 " >> /etc/fstab'

0 Likes

#31

Thanks @tcratius! I'm checking on this. I have sent you a private message with some follow up questions about your comments.

1 Like

closed #33

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes

opened #34
0 Likes

#35

Hi,

I came across with your post and it was really useful. It actually has this solution that not even on the raspberry pi community has.

I have a comment:

On my case, since sometimes I want to continue running R on the pi without RStudio Server because I would like to run R code on the terminal, I had to disable X11:

./configure --with-x=no --enable-R-shlib #--with-blas --with-lapack #optional

This because when I compile it with X with x11 yes is the defaultand try to run something on either the terminal or connect it with Jupyter, it fails.

0 Likes

#36

Hi, thanks for your feedback, do you have an example of this? I run R scripts using cron without a problem, on which cases does this fail?

0 Likes

#37

Hey,

It is this:

png('my_test')

And it prints this:

Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  :
  unable to start device PNG

Something worth noting is that I installed the Lite version of raspbian because I was planning on using it remote from the start.

*Edit: This is running R straight from the terminal on SSH.

0 Likes

#38

This is weird I can't replicate your issue, maybe you just don't have cairo system library and R package configured in your Pi

0 Likes

#39

Hey,

Quite the contrary: I actually configured like this:

./configure --with-x=no --with-cairo=yes --with-libpng=yes --enable-R-shlib

When you run:

capabilities()

What is your output? Mine is this:

       jpeg         png        tiff       tcltk         X11        aqua
       TRUE        TRUE        TRUE        TRUE       FALSE       FALSE
   http/ftp     sockets      libxml        fifo      cledit       iconv
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE
        NLS     profmem       cairo         ICU long.double     libcurl
       TRUE       FALSE        TRUE        TRUE       FALSE        TRUE

I came across with the idea of recompiling without X11 because of this answer on StackOverflow

0 Likes

#40

Almost the same except for the tiff capability

 capabilities()
       jpeg         png        tiff       tcltk         X11        aqua
       TRUE        TRUE       FALSE        TRUE       FALSE       FALSE
   http/ftp     sockets      libxml        fifo      cledit       iconv
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE
        NLS     profmem       cairo         ICU long.double     libcurl
       TRUE       FALSE        TRUE        TRUE       FALSE        TRUE

Why do you compile with Cairo instead of installing it separately like in the installation guide?

0 Likes

#41

The truth? Because I was desperate :stuck_out_tongue: However, the first time I compiled it didn't work. When I compiled it the second time without the X it did.

Something that puzzled me was that I was actually working with the base R version from raspbian (3.3.3) but since it is very old, a lot of libraries were complaining due to this.

0 Likes

#42

This is a fantastic guide!

I am having a problem however installing the shiny server this line return a checksum failed error

(cd .. && sudo ./external/node/install-node.sh)

any advise you could give would be appreciated

0 Likes

#43

Thanks for reporting that, apparently they have upgraded to Node.js 10.15.3 , so the SHA value doesn't match, I have updated the value to fix this, try running the installation script again with this new SHA value.

sed -i '8s/.*/NODE_SHA256=af2106b08f68e0884caa505ea7e695facc5b4cd356f1e08258899e94cc4c5df0/' ../external/node/install-node.sh # node-v10.15.3-linux-armv7l.tar.xz
0 Likes