Hi Weixiong,
without an intention to hijack the thread from candi,
you could also give LinuxBrew (a fork of Homebrew) a try.
Scripts in Homebrew are written in such a way as to protect picking up
things outside of Homebrew, so you shall not have any conflicts with whatever is installed on Linux.
I use the same scripts/formulae to install the full deal.II suite both on my mac (OS-X Yosemite) and Ubuntu 14.04LTS
without any issues (although I used Ubuntu a couple of months ago).
Roughly, what you do is
2) then Tap (add extra repository with software) homebrew science: brew tap homebrew/science
3) then install deal.II and extra:
brew install trilinos --without-python --with-openblas --without-scotch
brew install dealii --without-opencascade --without-muparser --with-openblas
this will also get openmpi, openblas, petsc, slepc, superlu_dist, parpack, hypre, metis, parmetis, hdf5, netcdf, fftw, p4est and suite-sparse.
Those "withouts" are only relevant for linux, as not all software is compiling there yet.
If you will have problems, let me know, i will try to recompile the whole thing on my Ubuntu
and see if i can help.
Regards,
Denis.