Error: package or namespace load failed for ‘gmm’ in dyn.load(file, DLLpath = DLLpath, ...):

Hello,

I am a new user of R. I have a Macbook Pro with an M1Pro process.

I installed R-4.2.0-arm64.pkg. I tried to install "gmm" library. However, I encountered the following problem:

library(gmm)
Error: package or namespace load failed for ‘gmm’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gmm/libs/gmm.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gmm/libs/gmm.so, 0x0006): Library not loaded: /opt/R/arm64/gfortran/lib/libgomp.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gmm/libs/gmm.so
Reason: tried: '/opt/R/arm64/gfortran/lib/libgomp.1.dylib' (no such file), '/usr/local/lib/libgomp.1.dylib' (no such file), '/usr/lib/libgomp.1.dylib' (no such file)

Can anyone help me with the problem? Any help will be greatly appreciated. Thank you so much!