fenguoerbian 做过的,因为之前安装包时的报错chatGPT解释可能是因为版本的原因。原本我用的4.2,后续更新到了4.3,然后改回4.2,最后还是决定用的4.3,而rtool全部同步更替了。
关于您给的命令,R的反馈如下:
第一条命令:
> Sys.getenv("PATH")
[1] "D:\\R\\setup\\rtools43\\x86_64-w64-mingw32.static.posix\\bin;D:\\R\\setup\\rtools43\\usr\\bin;\\usr\\bin;\\usr\\bin;C:\\Program Files\\R\\R-4.3.1\\bin\\x64;C:\\Program Files\\Python312\\Scripts\\;C:\\Program Files\\Python312\\;C:\\Program Files\\Java\\jdk-18.0.1.1\\\\bin;;JAVA_HOME%\\jre\\bin;C:\\Program Files\\Java\\jdk-18.0.1.1;C:\\rtools42;C:\\rtools42\\usr\\bin;C:\\rtools42\\mingw64\\bin;D:\\tool\\R-4.2.1\\bin\\x64\\Rcmd.exe;D:\\工具安装包\\go运行环境\\bin;C:\\Progr;m Files (x86)\\HP\\Common\\HPDestPlgIn\\;C:\\Rtools\\bin;C:\\Rtools\\mingw_64\\bin;C:\\Program Files\\Git\\cmd;C:Program FilesJavajdk-18.0.1.1\\bin;C:Program FilesJavajdk-18.0.1.1\\jrebin;C:\\Program Files\\Java\\jdk-18.0.1.1;C:\\Users\\small\\go\\bin;C:\\Program Files (x86)\\HP\\Common\\HPDestPlgIn;D:\\R\\RStudio\\resources\\app\\bin\\quarto\\bin;D:\\R\\RStudio\\resources\\app\\bin\\postback"
第二条命令:
> install.packages("PKI", type="source", verbose = TRUE)
将程序包安装入‘C:/Users/small/AppData/Local/R/win-library/4.3’
(因为‘lib’没有被指定)
系统(cmd0): C:/PROGRA~1/R/R-43~1.1/bin/x64/R CMD INSTALL
trying URL 'https://mirrors.pku.edu.cn/CRAN/src/contrib/PKI_0.1-12.tar.gz'
Content type 'application/octet-stream' length 85544 bytes (83 KB)
downloaded 83 KB
foundpkgs: PKI, C:\Users\small\AppData\Local\Temp\RtmpAnLgUW/downloaded_packages/PKI_0.1-12.tar.gz
文件: C:\Users\small\AppData\Local\Temp\RtmpAnLgUW/downloaded_packages/PKI_0.1-12.tar.gz
Warning in install.packages :
安装程序包‘PKI’时退出狀態的值不是0
下载的程序包在
‘C:\Users\small\AppData\Local\Temp\RtmpAnLgUW\downloaded_packages’里
第三道命令
> devtools::install_github("MathiasHarrer/dmetar", force = TRUE)
Downloading GitHub repo MathiasHarrer/dmetar@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/MathiasHarrer/dmetar/tarball/HEAD' failed