well, I thought that solved it (thanks by the way, that was a silly mistake ), but when I tried to use it :
library("pgirmess")
Erreur : package or namespace load failed for ‘pgirmess’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
aucun package nommé ‘rgdal’ n'est trouvé -> this mean he can't find "rgdal"
when I tried to charge rgdal this didn't change anything. An answer ?
installing source package ‘rgdal’ ...
** package ‘rgdal’ correctement décompressé et sommes MD5 vérifiées
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang
configure: CXX: clang++
configure: CFLAGS: -Wall -g -O2
configure: CPPFLAGS: -I/usr/local/include
configure: CXXFLAGS: -Wall -g -O2
configure: LDFLAGS: -L/usr/local/lib
configure: LDFLAGS: -L/usr/local/lib
configure: CXX11 is: clang++, CXX11STD is: -std=gnu++11
configure: CXX is: clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.5-18
checking for /usr/bin/svnversion... yes
configure: svn revision: 1082
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/r7/b3cjb4v52rv33f9dx3crvzxc0000gn/T/RtmplUV65J/downloaded_packages’
library("rgdal")
Error in library("rgdal") : aucun package nommé ‘rgdal’ n'est trouvé
This means that an error has occurred and rgdal has not been installed
You are trying to install the latest version from source but you are missing the gdal library, you would have to install it first (in your system not in R), unfortunately I can't tell you how since I'm not a macOS user.
Another option is to install the binary version that is a little older but doesn't require you to install the missing system library. You can do it by answering "no" to this question.