2016-05-25 142 views
0

我运行R 3.3.0RStudioWindows10环境中。有谁知道我为什么收到这条消息试图安装knitr。我问这个问题没有回答。现在我有一些时间并卸载了所有R版本和RStudio并安装了最新版本。问题没有消失安装knitr - 烦恼

install.packages("knitr") 
    Installing package into ‘\\xxxxx.se/users/Eke/xxx/Documents/R/win-library/3.3’ 
    (as ‘lib’ is unspecified) 
    also installing the dependencies ‘mime’, ‘stringi’, ‘magrittr’, ‘evaluate’, ‘digest’, ‘formatR’, ‘highr’, ‘markdown’, ‘stringr’, ‘yaml’ 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/mime_0.4.zip' 
    Content type 'application/zip' length 37402 bytes (36 KB) 
    downloaded 36 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/stringi_1.0-1.zip' 
    Content type 'application/zip' length 14302873 bytes (13.6 MB) 
    downloaded 13.6 MB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/magrittr_1.5.zip' 
    Content type 'application/zip' length 149985 bytes (146 KB) 
    downloaded 146 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/evaluate_0.9.zip' 
    Content type 'application/zip' length 41911 bytes (40 KB) 
    downloaded 40 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/digest_0.6.9.zip' 
    Content type 'application/zip' length 169272 bytes (165 KB) 
    downloaded 165 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/formatR_1.4.zip' 
    Content type 'application/zip' length 51790 bytes (50 KB) 
    downloaded 50 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/highr_0.6.zip' 
    Content type 'application/zip' length 35707 bytes (34 KB) 
    downloaded 34 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/markdown_0.7.7.zip' 
    Content type 'application/zip' length 167098 bytes (163 KB) 
    downloaded 163 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/stringr_1.0.0.zip' 
    Content type 'application/zip' length 83487 bytes (81 KB) 
    downloaded 81 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/yaml_2.1.13.zip' 
    Content type 'application/zip' length 175759 bytes (171 KB) 
    downloaded 171 KB 

    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/knitr_1.13.zip' 
    Content type 'application/zip' length 860259 bytes (840 KB) 
    downloaded 840 KB 

    package ‘mime’ successfully unpacked and MD5 sums checked 
    package ‘stringi’ successfully unpacked and MD5 sums checked 
    package ‘magrittr’ successfully unpacked and MD5 sums checked 
    package ‘evaluate’ successfully unpacked and MD5 sums checked 
    package ‘digest’ successfully unpacked and MD5 sums checked 
    package ‘formatR’ successfully unpacked and MD5 sums checked 
    package ‘highr’ successfully unpacked and MD5 sums checked 
    package ‘markdown’ successfully unpacked and MD5 sums checked 
    package ‘stringr’ successfully unpacked and MD5 sums checked 
    package ‘yaml’ successfully unpacked and MD5 sums checked 
    package ‘knitr’ successfully unpacked and MD5 sums checked 

    The downloaded binary packages are in 
     C:\Users\mali\AppData\Local\Temp\RtmpMnOG1B\downloaded_packages 
    Error: invalid version specification ‘NA’ 
    In addition: Warning message: 
    In utils:::packageDescription(packageName, fields = "Version") : 
     no package 'knitr' was found 

回答

1

我正在添加一个答案,因为我不能添加评论。

大多数情况下,它可能是文件夹的权限问题,请尝试安装在您的配置文件外的某处,例如在C或D驱动器中以“D:/ Rlibs”的形式安装。

忘了提及您可以随时拨打其他/新库文件夹.libPaths("../...")