Cannot update Package "xfun" to 0.19

Hello everbody, I am trying to knit the R Markdown code into PDF documents. But this error always appears:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'xfun' 0.18 is already loaded, but >= 0.19 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted

I am using the current version of R Studio (Version 1.3.1093) and R version 4.0.3 (2020-10-10), But I can not update the package "xfun" to 0.19 from 0.18. Can you help me? thanks in advance!

Hello,

What happens when you run the below?

install.packages("xfun")
4 Likes

So I have tried to reinstall the R Studio and restart it, and now it works fine. I don't really now why but now I am able to knit to PDF. Anyway thanks!

1 Like

On your packages tab you're able to unattach or delete a package as well. You don't have to completely reinstall everything :slight_smile: Glad it is working now

I have tried it alread to unattach the package and tried to update the newest version of it but it didn't change anything and was still showing the oldest version of xfun package. :sweat_smile:

1 Like

Hello!

I have the same problem, so I did that, but does not work .

install.packages("xfun")

Yesterday I was able to knit the R Markdown code into PDF documents without problems, and suddenly is not possible anymore. I get the same error message:

Fehler in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
namespace 'xfun' 0.16 is already loaded, but >= 0.19 is required
Ruft auf: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace

Thanks in advance!

Which version of R Studio and R that you use? Have you tried to update the xfun packageto 0.19 R Studio?

I have R Studio, Version 1.3.1073. I installed the fun-package yesterday.

What I did was install the newest version of R Studio Version 1.3.1093. Then I did restart to install the xfun package again, then it suddenly showed the version 0.19 of xfun package

Before with the old version of R Studio, it stayed in version 0.18 and didn't change at all.

2 Likes

Just to clarify, RStudio is just an IDE for the R programming language so the RStudio version has no influence in your packages library, most likely what helped you was to restart your R session.

I have had to same Problem under RStudio 1.4.1103.0 and R 4.0.4 (Win10, 20H2). The problem appeared after I updated the installed packages. I can't say which ones exactly, because I updated all packages...

Apparently you're using some other package that requires xfun version 0.19. So you need to stop using that non-CRAN package, or update xfun from Github or some other untested source. You can run remotes::update_packages() to search lots of places for updates.. .

Worked for me, installed xfun again and I could knit again my .Rmd file

OMG thannk you so much! install.packages("xfun") worked!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.