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 - http://www.ros.org/reps/rep-0131.html#variants
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: https://bitcointalk.org/index.php?topic=304389.msg7374545#msg7374545

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