Installation of devtools not working

I tried to install the package devtools and i always get this error message:

install.packages("devtools")
Installing package into ‘C:/Users/Julia Händel/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
devtools 2.2.2 2.3.0 FALSE

installing the source package ‘devtools’

versuche URL 'https://cran.rstudio.com/src/contrib/devtools_2.3.0.tar.gz'
Content type 'application/x-gzip' length 375227 bytes (366 KB)
downloaded 366 KB

  • installing source package 'devtools' ...
    ** Paket 'devtools' erfolgreich entpackt und MD5 Summen überprüft
    ** using staged installation
    Warnung in file(file, if (append) "a" else "w")
    kann Datei 'C:/Users/Julia Hdndel/Documents/R/win-library/3.6/00LOCK-devtools/00new/devtools/DESCRIPTION' nicht öffnen: No such file or directory
    Error in file(file, if (append) "a" else "w") :
    kann Verbindung nicht öffnen
    ERROR: installing package DESCRIPTION failed for package 'devtools'
  • removing 'C:/Users/Julia Händel/Documents/R/win-library/3.6/devtools'
    Warning in install.packages :
    installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Julia Händel\AppData\Local\Temp\RtmpMvATi0\downloaded_packages’

Can someone help me solve the problem? Thanks!!

R has problems with non-ASCII characters on Windows user names, try to install into the system-level library instead.

install.packages("devtools", lib = "C:\\Program Files\\R\\R-3.6.3\\library")

You have to run RStudio as "Administrator" for this to work

It worked!!! Thank you so much

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

Thanks!! I tried it, but i still get this error message:

install.packages("devtools", lib = "C:\Program Files\R\R-3.6.3\library")
Warning in install.packages :
'lib = "C:\Program Files\R\R-3.6.3\library"' is not writable

There is a binary version available but the source version is later:
binary source needs_compilation
devtools 2.2.2 2.3.0 FALSE

installing the source package ‘devtools’

versuche URL 'https://cran.rstudio.com/src/contrib/devtools_2.3.0.tar.gz'
Content type 'application/x-gzip' length 375227 bytes (366 KB)
downloaded 366 KB

  • installing source package 'devtools' ...
    ** Paket 'devtools' erfolgreich entpackt und MD5 Summen überprüft
    ** using staged installation
    Warnung in file(file, if (append) "a" else "w")
    kann Datei 'C:/Users/Julia Hdndel/Documents/R/win-library/3.6/00LOCK-devtools/00new/devtools/DESCRIPTION' nicht öffnen: No such file or directory
    Error in file(file, if (append) "a" else "w") :
    kann Verbindung nicht öffnen
    ERROR: installing package DESCRIPTION failed for package 'devtools'
  • removing 'C:/Users/Julia Händel/Documents/R/win-library/3.6/devtools'
    Warning in install.packages :
    installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Julia Händel\AppData\Local\Temp\RtmpsHo7Qy\downloaded_packages’


It is in Spanish but I think you can get the idea. Right-click on the RStudio icon, and select "Run as administrator" or something similar depending on your OS language.

Oh okay, I am so sorry but could you maybe explain how to do it as Admnistrator?