Versions are right, but it says my OF version is not supported.

Submitted by Zekun Wang on Sat, 12/17/2016 - 12:42

************************************
ERROR from your CFDEM code!
ERROR: your OpenFOAM(R) version is not supported!
Please use a version that is supported, i.e., see the bashrc file in the source directory!
************************************
My system is Ubuntu 16.04 and i have downloaded OpenFOAM3.0.x and LIGGGHTS 3.5.0 on my computer, and it seems that the versions of the softwares are all correct ,but I can't compile them ,why?please help me, and I am new in Ubuntu.(Do I need to open OpenFOAM (of30x) before I complie them? Do I need to change environmental variables? Do I need to "mkdir LIGGGHTS" and clone gits since I have installed LIGGGHTS, thx!)