I use ubuntu 20.04 and install R version 4.1.0 , now i want install tidyverse package but get this error:
2 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: readstat/spss/readstat_zsav_read.o] Error 1
ERROR: compilation failed for package ‘haven’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/4.1/haven’
Warning in install.packages :
installation of package ‘haven’ had non-zero exit status
ERROR: dependency ‘haven’ is not available for package ‘tidyverse’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/4.1/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
and when install haven package get an error that say:
2 | #include <zlib.h>
| ^~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:168: readstat/spss/readstat_zsav_read.o] Error 1
ERROR: compilation failed for package ‘haven’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/4.1/haven’
Warning in install.packages :
installation of package ‘haven’ had non-zero exit status
how can resolve these errors?