packages updates

When trying to update some packages, I get this:

`type or paste code here`

Installing 'markdown' for R Markdown...

Installing package into 'C:/Users/Christine/AppData/Local/R/win-library/4.2'
(as 'lib' is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
markdown 1.1 1.2 TRUE

installing the source package 'markdown'

trying URL 'https://cran.rstudio.com/src/contrib/markdown_1.2.tar.gz'
Content type 'application/x-gzip' length 80862 bytes (78 KB)

downloaded 78 KB

  • installing source package 'markdown' ...
    ** package 'markdown' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Rbase64.c -o Rbase64.o
    sh: gcc: command not found
    make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:252: Rbase64.o] Error 127
    ERROR: compilation failed for package 'markdown'
  • removing 'C:/Users/Christine/AppData/Local/R/win-library/4.2/markdown'

The downloaded source packages are in
'C:\Users\Christine\AppData\Local\Temp\RtmpIBdiXp\downloaded_packages'

:heavy_check_mark: Package 'markdown' successfully installed.
Warning message:
In utils::install.packages("markdown", repos = "https://cran.rstudio.com/") :
installation of package 'markdown' had non-zero exit status

I have uninstalled and reinstalled rmarkdown but when I try to open an rmd doc, R Studio tells me I need an updated version of rmarkdown. I click yes to install it and I get the above.

Session info:
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rmarkdown_2.17

loaded via a namespace (and not attached):
[1] compiler_4.2.0 fastmap_1.1.0 cli_3.3.0 htmltools_0.5.2 tools_4.2.0 knitr_1.39 xfun_0.31
[8] digest_0.6.29 rlang_1.0.2 evaluate_0.15

Unless your system is set up to compile programs (which is possible, but something that most users shouldnā€™t be spending the required time on), the ā€œinstall from sourceā€ option will fail.

Just say ā€œno.ā€

That did not work.
The exact same thing keeps happening. I tried to update the packages. Said no to compilation.
Tried again to load an rmd doc. Was prompted again that rmarkdown needed updating. Said yes to that.
And got the same message I posted above and none of the packages updated.

Try this again from the console pane?

Still the same.
I tried with to update data.table. If I say no to compilation, it does not update.
If I says yes, I get the same error message and no update either.
All in the console.
install.packages("data.table")
Installing package into ā€˜C:/Users/Christine/AppData/Local/R/win-library/4.2ā€™
(as ā€˜libā€™ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
data.table 1.14.2 1.14.4 TRUE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/data.table_1.14.2.zip'
Content type 'application/zip' length 2243013 bytes (2.1 MB)
downloaded 2.1 MB

package ā€˜data.tableā€™ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Christine\AppData\Local\Temp\Rtmpe8HphA\downloaded_packages

install.packages("data.table")
Installing package into ā€˜C:/Users/Christine/AppData/Local/R/win-library/4.2ā€™
(as ā€˜libā€™ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
data.table 1.14.2 1.14.4 TRUE

installing the source package ā€˜data.tableā€™

trying URL 'https://cran.rstudio.com/src/contrib/data.table_1.14.4.tar.gz'
Content type 'application/x-gzip' length 5304297 bytes (5.1 MB)
downloaded 5.1 MB

  • installing source package 'data.table' ...
    ** package 'data.table' successfully unpacked and MD5 sums checked
    ** using staged installation


    WARNING: this package has a configure script
    It probably needs manual configuration


** libs
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c assign.c -o assign.o
sh: gcc: command not found
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:252: assign.o] Error 127
ERROR: compilation failed for package 'data.table'

  • removing 'C:/Users/Christine/AppData/Local/R/win-library/4.2/data.table'
  • restoring previous 'C:/Users/Christine/AppData/Local/R/win-library/4.2/data.table'
    Warning in install.packages :
    installation of package ā€˜data.tableā€™ had non-zero exit status

The downloaded source packages are in
ā€˜C:\Users\Christine\AppData\Local\Temp\Rtmpe8HphA\downloaded_packagesā€™

Hi @socprof,
There is some confusion going on here.
Firstly, this output:

install.packages("data.table")
Installing package into ā€˜C:/Users/Christine/AppData/Local/R/win-library/4.2ā€™
(as ā€˜libā€™ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
data.table 1.14.2 1.14.4 TRUE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/data.table_1.14.2.zip'
Content type 'application/zip' length 2243013 bytes (2.1 MB)
downloaded 2.1 MB

package ā€˜data.tableā€™ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Christine\AppData\Local\Temp\Rtmpe8HphA\downloaded_packages

means that the binary version of data.table was installed correctly - no need to do any more. Then library(data.table) should proceed without any errors.

Secondly, the rmarkdown package is NOT the same as the markdown package.
If you run install.packages("rmarkdown", dependencies=TRUE, type="win.binary") that should be all you need to do. If library(rmarkdown) runs without error then RStudio should be able to knit an Rmd file.

Thanks for the suggestions.
I ran install.packages("rmarkdown", dependencies=TRUE, type="win.binary"). Load rmarkdown.
Still the same problem. BUT I ran the same thing for the markdown package and that seemed to do it.

1 Like

This topic was automatically closed 7 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.