2

I was trying to install the package "pgenlibr" in the github, using the command

install_github("chrchang/plink-ng", subdir="/2.0/pgenlibr"), and received the error message.

> install_github("chrchang/plink-ng", subdir="/2.0/pgenlibr")
Downloading GitHub repo chrchang/plink-ng@HEAD
√  checking for file 'C:\Users\86137\AppData\Local\Temp\RtmpILEuSP\remotes109044a8685a\chrchang-plink-ng-73bdbc3\2.0\pgenlibr/DESCRIPTION' ...
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem copying .\pgenlibr\src\include to C:\Users\86137\AppData\Local\Temp\RtmpaONA8h\Rbuild2e1c6cc05dce\pgenlibr\src\include: Permission denied
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem copying .\pgenlibr\src\libdeflate to C:\Users\86137\AppData\Local\Temp\RtmpaONA8h\Rbuild2e1c6cc05dce\pgenlibr\src\libdeflate: Permission denied
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem copying .\pgenlibr\src\zstd to C:\Users\86137\AppData\Local\Temp\RtmpaONA8h\Rbuild2e1c6cc05dce\pgenlibr\src\zstd: Permission denied
    ERROR
   copying to build directory failed
Error: Failed to install 'pgenlibr' from GitHub:
  System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed

I have installed its required software listed on Readme, Rtools, all packages dependencies. I have also tried other methods, delete all Rtmp files, run Rstudio as administrator, cancel "read only" to folder "temp" and "library" in the workpath, but gained no success.

In addition, I'm using Windows 10.

How can I solve this problem?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Jason Li
  • 21
  • 2

2 Answers2

0

I have solve this problem on Ubuntu System. There is a similar problem when installing 'cindex', Here is the a link. So the reason seems to be that install_github( ) in Win10 can not deal with symlink very well.

0

I got the same error when I was building the source for an R package and there was a syntax error in the DESCRIPTION file.

To solve, I removed suspected culprits from the DESCRIPTION file and it worked, so then just narrowed down to isolate the offending line (it was a typo in the person() function in my case, but causes my vary).

stevec
  • 41,291
  • 27
  • 223
  • 311