简体   繁体   English

devtools::build() 无法统计存在的目录

[英]devtools::build() cannot stat directories that exist

I'm using devtools to build a package that has packrat enabled.我正在使用devtools来构建一个启用了Packrat的包。 When I issue the command devtools::build() I get the following:当我发出命令devtools::build()我得到以下信息:

'/usr/lib64/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD build '/home/user/Development/CPAT' --no-resave-data --no-manual 

* checking for file ‘/home/user/Development/CPAT/DESCRIPTION’ ... OK
cp: cannot stat 'CPAT/packrat/lib-ext/i686-pc-linux-gnu/3.4.2/CPAT': No such file or directory
cp: cannot stat 'CPAT/packrat/lib-ext/i686-pc-linux-gnu/3.4.2/R6': No such file or directory
cp: cannot stat 'CPAT/packrat/lib-ext/i686-pc-linux-gnu/3.4.2/Rcpp': No such file or directory
cp: cannot stat 'CPAT/packrat/lib-ext/i686-pc-linux-gnu/3.4.2/RcppArmadillo': No such file or directory
...
 ERROR
copying to build directory failed
Error: Command failed (1)

I checked .Rbuildignore and the line ^packrat/ is there, so I would think that packrat would be ignored, but that doesn't appear to be the case.我检查了.Rbuildignore并且^packrat/行在那里,所以我认为packrat会被忽略,但情况似乎并非如此。

I should also mention that the directories mentioned above reference files that are on a different computer than the one building the package;我还应该提到,上面提到的目录引用的文件与构建包的计算机位于不同的计算机上; the platform is x86_64-pc-linux-gnu and the R version is 3.5.1.平台为x86_64-pc-linux-gnu ,R 版本为 3.5.1。 (When I use ls to list the above files I see that the files are symbolic links). (当我使用ls列出上述文件时,我看到这些文件是符号链接)。 Thus the R versions are not the same on both computers, but I've been using git to develop the package on both computers.因此,两台计算机上的 R 版本并不相同,但我一直在使用 git 在两台计算机上开发软件包。

What should I do about this error?我该怎么办这个错误?

重新启动会话(Ctrl + Shift + F10)似乎经常为我解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM