If anyone meet "library not found" , this issue can be solved by following steps:
open the terminal and login as the root, and find the missing library (for example libgfortran.3.dylib):
sudo su
find / -name libgfortran.3.dylib
then you will see the full path of this library, for example "/Library/Frameworks/R.framework/Versions/3.2/Resources/lib/libgfortran.3.dylib"
copy it into /usr/lib directory
cp /Library/Frameworks/R.framework/Versions/3.2/Resources/lib/libgfortran.3.dylib /usr/lib
If anyone meet "library not found" , this issue can be solved by following steps: