Installation Tidyverse - ERROR: configuration failed for package ‘haven’

I try to install the Tidyverse library, for version 4.2.0 of R for MAC and I get the following error:

ERROR: configuration failed for package ‘haven’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/haven’
    Warning in install.packages :
    installation of package ‘haven’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/d6/nsl_fg5j1b1cztyjvbnltczr0000gn/T/Rtmpol15Rq/downloaded_packages’

I would be very grateful if you could help me solve this problem.

Can you please post the complete console output you get when you try to install it? The excerpt you are showing is only telling us that the installation process has failed but it doesn't give us a clue on the cause.

Thank you very much for your reply. I restarted the program and when I tried to install, there was no more problem.

> install.packages("tidyverse")
also installing the dependency ‘haven’

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/haven_2.5.0.tgz'
Content type 'application/x-gzip' length 1043687 bytes (1019 KB)
==================================================
downloaded 1019 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/tidyverse_1.3.1.tgz'
Content type 'application/x-gzip' length 421133 bytes (411 KB)
==================================================
downloaded 411 KB


The downloaded binary packages are in
	/var/folders/d6/nsl_fg5j1b1cztyjvbnltczr0000gn/T//RtmpxVRRnI/downloaded_packages