Mikdad
April 23, 2021, 11:20am
1
I can't install any package please help me
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/مقداد/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to translate 'C:\Users\<U+0645><U+0642><U+062F><U+0627><U+062F>\Documents\R\win-library\4.0' to native encoding
Warning in install.packages :
unable to translate 'C:/Users/<U+0645><U+0642><U+062F><U+0627><U+062F>/Documents/R/win-library/4.0' to native encoding
andrie
April 23, 2021, 11:24am
2
Have you tried to install Rtools from the link that warning message points to?
https://cran.rstudio.com/bin/windows/Rtools/
You don't say what you tried, but it seems that at least one of your packages needs to be compiled from source.
Please provide more details of how you are trying to install these packages. What is the exact command you typed into your R console?
Also, how have you configured your CRAN repository? What is the value of
getOption("repos"
Mikdad
April 23, 2021, 12:19pm
3
I write in consol , install.packages("swirl")
R has problems with non-ASCII characters in Windows user names, as a walk around you can install into the system level package library instead.
You can change the default library folder by setting your R_LIBS_SITE
environmental variable on a .Reviron or .Rprofile file
# In a .Renviron file you can set it by adding this line
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.5\\library"
For a more detailed explanation, you can read this blog post
Mikdad
April 30, 2021, 4:52pm
6
after that i can install package?
After that this issue will be solved, but the only way to know if you will be able to install the package is trying.
Mikdad
April 30, 2021, 7:33pm
8
Installing package into ‘C:/Users/مقداد/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to translate 'C:\Users<U+0645><U+0642><U+062F><U+0627><U+062F>\Documents\R\win-library\4.0' to native encoding
Warning in install.packages :
unable to translate 'C:/Users/<U+0645><U+0642><U+062F><U+0627><U+062F>/Documents/R/win-library/4.0' to native encoding
also installing the dependencies ‘utf8’, ‘pillar’, ‘pkgconfig’, ‘vctrs’, ‘sys’, ‘rprojroot’, ‘rstudioapi’, ‘diffobj’, ‘fansi’, ‘rematch2’, ‘tibble’, ‘askpass’, ‘glue’, ‘magrittr’, ‘stringi’, ‘brio’, ‘callr’, ‘cli’, ‘crayon’, ‘desc’, ‘ellipsis’, ‘evaluate’, ‘jsonlite’, ‘lifecycle’, ‘pkgload’, ‘praise’, ‘processx’, ‘ps’, ‘R6’, ‘rlang’, ‘waldo’, ‘withr’, ‘curl’, ‘mime’, ‘openssl’, ‘bitops’, ‘stringr’, ‘testthat’, ‘httr’, ‘yaml’, ‘RCurl’, ‘digest’
Mikdad
April 30, 2021, 7:34pm
9
The error has appeared again
Yes, because you haven't changed the default package library folder as advised, you are still using the same folder, ergo, you get the same error message.
system
Closed
May 21, 2021, 7:55pm
11
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.