Installing ROS from source

Hi I installed ROS from source on Debian Stretch 9.0 iot image. I thought I would document it here for anybody who is like me and doesn’t have much experience with this.

Note: I installed the ROS lunar-robot variant -
Note: You will most likely need an sd card > 4GB

PRE-INSTALL - I had some out of memory errors when building and compiling so I added some swap space. Sources:

looks like in step 9 you are missing – before os=