braverock / quantstrat

289 stars 114 forks source link

Installation Error 127 #111

Closed OmarOmeiri closed 5 years ago

OmarOmeiri commented 5 years ago

Hello! I've been trying to install quantstrat for some time now. I have a consistent error code 127. I've tried installing with: remotes::install_github("braverock/quantstrat")

remotes::install_github("braverock/blotter") remotes::install_github("braverock/quantstrat")

devtools::install_github("braverock/blotter") devtools::install_github("braverock/quantstrat")

but the traceback is always the same. Downloading GitHub repo braverock/blotter@master sh: /usr/local/bin/gtar: No such file or directory sh: /usr/local/bin/gtar: No such file or directory Error: Failed to install 'blotter' from GitHub: error in running command In addition: Warning messages: 1: In system(cmd) : error in running command 2: In utils::untar(tarfile, ...) : ‘/usr/local/bin/gtar -xf '/var/folders/3f/yyvy83n55tv66fdw10cbb4d80000gn/T//RtmptIZ8l6/file2d0946b333f.tar.gz' -C '/var/folders/3f/yyvy83n55tv66fdw10cbb4d80000gn/T//RtmptIZ8l6/remotes2d0919f16f5d'’ returned error code 127

Downloading GitHub repo braverock/quantstrat@master sh: /usr/local/bin/gtar: No such file or directory sh: /usr/local/bin/gtar: No such file or directory Error: Failed to install 'quantstrat' from GitHub: error in running command In addition: Warning messages: 1: In system(cmd) : error in running command 2: In utils::untar(tarfile, ...) : ‘/usr/local/bin/gtar -xf '/var/folders/3f/yyvy83n55tv66fdw10cbb4d80000gn/T//RtmptIZ8l6/file2d09438f2f90.tar.gz' -C '/var/folders/3f/yyvy83n55tv66fdw10cbb4d80000gn/T//RtmptIZ8l6/remotes2d096d7bb996'’ returned error code 127

what could be the source of this?? Thanks in advance!

joshuaulrich commented 5 years ago

A quick search of the error code suggests remotes::install_github() can't find an untar function on your system. I don't know why that would be the case, and I don't have time to debug. I'm going to close this issue, because the source of the error isn't in quantstrat.

OmarOmeiri commented 5 years ago

Ok, thanks for your time anyways Josh!

I've managed to solve it using: Sys.setenv(TAR = '/usr/bin/tar')

Hope this helps other users. I think it is a problem only for MAC users.