Ubuntu Mate Raspberry Pi Setup Guide on RPI-2 board

Following instructions are hosted on my gist account also.
I can compile the polygon and opencv examples successfully after the issues.
Now everything works fine. Enabling overclock makes compiling process faster btw.

Ubuntu Mate Raspberry Pi Setup on RPI-2 board##

  1. Download ubuntu RPI image

  2. Use Etcher freeware to burn image to SD Card

  3. Attach SD Card to rPi, connect keyboard, mouse and display to rPi for the first run and power up RPI

  4. Follow the instructions and create user (pi) and password (raspberry)

  5. When desktop interface starts, open up Terminal and edit raspi-config to enable following commands;

sudo raspi-config

  • Change Boot Options to the Command Line
  • Change Interfacing Options to enable SSH
  • Change Memory Split option to 64 M from Advanced Options
  • Change GL Driver option to 3rd one to disable GL Driver from Advanced Options
  • Save, exit & reboot
  1. Login to “pi” user

  2. Download nightly build oF arm7 version

curl -O http://ci.openframeworks.cc/versions/nightly/of_v20170714_linuxarmv7l_nightly.tar.gz

  1. Make oF directory

mkdir of_v20170714_linuxarmv7l_nightly

  1. Upack the content into this oF directory

tar vxfz of_v20170714_linuxarmv7l_nightly.tar.gz -C of_v20170714_linuxarmv7l_nightly --strip-components 1

  1. Run dependencies scripts. I get bunch of issues in this section. If you have it also, read the the following fixes and redo the dependencies installation

cd of_v20170714_linuxarmv7l_nightly/scripts/linux/ubuntu
sudo ./install_dependencies.sh

ISSUE 1: When installing dependencies I got error libgl1-mesa-dev-hwe-16.0.4
installing OF dependencies with -hwe-16.04 packages, confirm Y/N ?

E: Unable to locate package libgl1-mesa-dev-hwe-16.04 AND This package doesn't support your platform, probably you downloaded the wrong package? [UBUNTU]

Just type N to fix this issue 1

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

ref. & fix: https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process
to fix the issue run the following commands;

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo ./install_dependencies.sh

  1. If everything goes fine, run codec installation scripts

sudo ./install_codecs.sh

  1. Set your make flags in your .bash_profile

sudo nano ~/.bash_profile

add the following Line (MAKEFLAGS=-j2 not -j4 because of ISSUE 3 see below)


and Save


  1. cd /home/pi/of_v20170714_linuxarmv7l_nightly/examples/graphics/polygonExample
    ISSUE 3:
    I got the following error;
    virtual memory exhausted: Cannot allocate memory

    ref. & fix:

And recompile again if it fails again then recompile again…I can compile the example at the 2nd try

1 Like