Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘broom

I've tried looking for a solution to this problem but haven't found any. This is a new issue that occurred when I updated R
When installing tidyverse I see this:

There is a binary version available but the source version is
  later:
      binary source needs_compilation
broom  0.5.5  0.5.6             FALSE

then this:

Error: unexpected string constant in:
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status

When I try to load tidyverse it says there is no package called broom. I try to manually install broom:


Error: unexpected string constant in:
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status

I get the same error. Any help with this?

2 Likes

This issue was resolved when I installed the binary

install.packages("broom", type="binary")

I had to this with one other package as well (withr). I still don't have a decent understanding of what the issue is and never had this problem after updating R prior to this, would anyone care to explain?

3 Likes

The reason for this is that the compiler has issues with empty spaces in your windows user name, if you want to avoid this problem while installing packages from source, change your user name or install to the system level library instead.

1 Like

Sounds good, thanks for clearing that up!

I was having this same issue only the error was when installing dplyr, tidyr, or ggplot2 and said 'there is no package called 'pillar''. I used this post to resolve the issue with:

install.packages("pillar", type="binary")

Thank you @chrisb1

However, I had already uninstalled and reinstalled R to C:\R\R.4.0.0 instead of C:\Program Files\R\R.4.0.0 because I thought the issue might be due to the space in the file path but I still had the same issue until using the fix above. So I am still confused as to why this error was occurring.

That is not necessary, the issue is with empty spaces in the user level package library (caused by an empty space in the windows user name)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.