installing spdep package

I am having an issue installing the spdep package in RStudio, i keep on geeting the following message: Warning in install.packages : installation of package 'spdep' had non-zero exit status

The downloaded source packages are in
'/private/var/folders/9t/bn0yq2055_192scxzp2d767179fm3t/T/Rtmp8k3IJh/downloaded_packages'

Any idea how to get around this

Regards

Hi, welcome!
Could you post the whole error message? You are omitting the important parts.

Thanks Sustainer for your quick response here is part of the message

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2019c.1.0/zoneinfo/Africa/Nairobi'

  • installing source package 'deldir' ...
    ** package 'deldir' successfully unpacked and MD5 sums checked
    ** libs
    gfortran-4.8 -fPIC -g -O2 -c acchk.f -o acchk.o
    make: gfortran-4.8: No such file or directory
    make: *** [acchk.o] Error 1
    ERROR: compilation failed for package 'deldir'
  • removing '/Users/ineema/Library/R/3.3/library/deldir'
    Warning in install.packages :
    installation of package 'deldir' had non-zero exit status
    During startup - Warning messages:
    1: Setting LC_CTYPE failed, using "C"
    2: Setting LC_TIME failed, using "C"
    3: Setting LC_MESSAGES failed, using "C"
    4: Setting LC_MONETARY failed, using "C"
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019c.1.0/zoneinfo/Africa/Nairobi'
  • installing source package 'expm' ...
    ** package 'expm' successfully unpacked and MD5 sums checked
    ** libs
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c R_dgebal.c -o R_dgebal.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c expm-eigen.c -o expm-eigen.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c expm.c -o expm.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c init.c -o init.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c logm-eigen.c -o logm-eigen.o
    gfortran-4.8 -fPIC -g -O2 -c matexp.f -o matexp.o
    make: gfortran-4.8: No such file or directory
    make: *** [matexp.o] Error 1
    ERROR: compilation failed for package 'expm'
  • removing '/Users/ineema/Library/R/3.3/library/expm'
    Warning in install.packages :
    installation of package 'expm' had non-zero exit status
    During startup - Warning messages:
    1: Setting LC_CTYPE failed, using "C"
    2: Setting LC_TIME failed, using "C"
    3: Setting LC_MESSAGES failed, using "C"
    4: Setting LC_MONETARY failed, using "C"
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019c.1.0/zoneinfo/Africa/Nairobi'
    ERROR: dependencies 'classInt', 'units' are not available for package 'sf'
  • removing '/Users/ineema/Library/R/3.3/library/sf'
    Warning in install.packages :
    installation of package 'sf' had non-zero exit status
    During startup - Warning messages:
    1: Setting LC_CTYPE failed, using "C"
    2: Setting LC_TIME failed, using "C"
    3: Setting LC_MESSAGES failed, using "C"
    4: Setting LC_MONETARY failed, using "C"
    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2019c.1.0/zoneinfo/Africa/Nairobi'
    ERROR: dependencies 'sf', 'deldir', 'expm' are not available for package 'spdep'
  • removing '/Users/ineema/Library/R/3.3/library/spdep'
    Warning in install.packages :
    installation of package 'spdep' had non-zero exit status

The downloaded source packages are in
'/private/var/folders/9t/bn0yq2055_192scxzp2d767179fm3t/T/Rtmp8k3IJh/downloaded_packages'

Regards

Do you have xcode installed in your system? You need it for compiling packages on MacOS

xcode-select --install

Here are some installation instructions

thanks i will follow the instruction