This comes up for me quite often so I decided to add a post about it.
Here are some quick and easy to follow step for installing/updating MRAA and UPM on an Intel Edison. The Edison generally has the prerequisites installed already so you should just have to compile. If you need more comprehensive instructions you can take a look at MRAA/UPM section of my Getting Started with Minnow Board Max post.
These instructions assume you have git installed. If not install git first following the instructions found here.
First we need to clone the MRAA repo from git hub:
git clone https://github.com/intel-iot-devkit/mraa.git
This will download whatever the default branch and tag is currently set at (usually the latest). If you wanted to switch to another tag (like version 7.3 for example) now is the time to do so
Now we are ready to build. We will used the same out of tree build as described in the MRAA documentation.
mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILDSWIGJAVA=ON make sudo make install
UPM can be cloned with the following:
git clone https://github.com/intel-iot-devkit/upm.git
Switch to the desired version (or just use the default). Ensure the version you select is supported by the version of MRAA that is installed.
Now is also the time to add any libraries that you need that are not currently in the release. Just add the directory of the driver to the /src directory with the required support files.
We will again be using the out of tree build as described in the documentation. Enter these commands to build and install:
mkdir build cd build cmake ..
-DCMAKE_INSTALL_PREFIX:PATH=/usrmake sudo make install
Building UPM on an Edison can take a while, so be patient.
That should do it. If there are no error messages you should be ready to utilize the new libraries.