{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/packrat/issues/524","repository_url":"https://api.github.com/repos/rstudio/packrat","labels_url":"https://api.github.com/repos/rstudio/packrat/issues/524/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/packrat/issues/524/comments","events_url":"https://api.github.com/repos/rstudio/packrat/issues/524/events","html_url":"https://github.com/rstudio/packrat/issues/524","id":394591609,"node_id":"MDU6SXNzdWUzOTQ1OTE2MDk=","number":524,"title":"\"Error in !packrat::opts$symlink.system.packages() : invalid argument type\"","user":{"login":"slhck","id":582444,"node_id":"MDQ6VXNlcjU4MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/582444?v=4","gravatar_id":"","url":"https://api.github.com/users/slhck","html_url":"https://github.com/slhck","followers_url":"https://api.github.com/users/slhck/followers","following_url":"https://api.github.com/users/slhck/following{/other_user}","gists_url":"https://api.github.com/users/slhck/gists{/gist_id}","starred_url":"https://api.github.com/users/slhck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slhck/subscriptions","organizations_url":"https://api.github.com/users/slhck/orgs","repos_url":"https://api.github.com/users/slhck/repos","events_url":"https://api.github.com/users/slhck/events{/privacy}","received_events_url":"https://api.github.com/users/slhck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-28T09:30:05Z","updated_at":"2019-01-04T18:17:29Z","closed_at":null,"author_association":"NONE","body":"I have recently upgraded R from 3.5.1 to 3.5.2 with Homebrew, which means that existing package installs were no longer available.\r\n\r\nI have an installation script for my project, which looks like this:\r\n\r\n```\r\n➜ cat requirements.R\r\n#!/usr/bin/env Rscript\r\ninstall.packages(\"packrat\")\r\nlibrary(packrat)\r\npackrat::restore()\r\n```\r\n\r\nWhen I run it:\r\n\r\n```\r\n➜ Rscript requirements.R\r\nInstalling package into ‘/Users/werner/Documents/Projects/test/data-analyze/rscript/packrat/lib/x86_64-apple-darwin17.7.0/3.5.2’\r\n(as ‘lib’ is unspecified)\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  123k  100  123k    0     0   225k      0 --:--:-- --:--:-- --:--:--  224k\r\n* installing *source* package ‘packrat’ ...\r\n** package ‘packrat’ successfully unpacked and MD5 sums checked\r\n** R\r\n** inst\r\n** byte-compile and prepare package for lazy loading\r\n** help\r\n*** installing help indices\r\n** building package indices\r\n** testing if installed package can be loaded\r\n* DONE (packrat)\r\n\r\nThe downloaded source packages are in\r\n    ‘/private/var/folders/1s/9jbdrzg17wvcnr76p_ntdnbw0000gn/T/RtmprkwTTu/downloaded_packages’\r\n\r\nThe following packages were not installed by packrat and will be ignored:\r\n            _\r\n    packrat   0.4.9-2\r\n\r\nIf you would like to overwrite them, call restore again with\r\noverwrite.dirty = TRUE.\r\nInstalling BH (1.66.0-1) ...\r\n    OK (built source)\r\n...\r\nInstalling ggmap (2.6.1) ...\r\nFailed to extract archive:\r\n- '/Users/werner/Documents/Projects/test/data-analyze/rscript/packrat/src/ggmap/ggmap_2.6.1.tar.gz' => '/var/folders/1s/9jbdrzg17wvcnr76p_ntdnbw0000gn/T//RtmprkwTTu'\r\nReason: incomplete block on file\r\n\r\nError in if (!file.exists(file.path(pkg_path, \"DESCRIPTION\"))) { :\r\n  argument is of length zero\r\nCalls: <Anonymous> ... installPkg -> <Anonymous> -> install_local_path -> lapply -> FUN\r\nIn addition: Warning message:\r\nIn packrat::restore() :\r\n  The most recent snapshot was generated using R version 3.5.1\r\nExecution halted\r\n```\r\n\r\nSo, for some reason it halted. Now when I try to run it again, I get:\r\n\r\n```\r\n➜ Rscript requirements.R\r\nError in !packrat::opts$symlink.system.packages() : invalid argument type\r\nCalls: source ... setPackratModeOn -> afterPackratModeOn -> symlinkSystemPackages\r\nExecution halted\r\n```\r\n\r\nI would think that there's a bug somewhere that leads to the current project being broken due to an incomplete installation.\r\n\r\nI am not sure what I'm supposed to do here … what are the steps necessary to revert properly?\r\n\r\nSome debugging info:\r\n\r\n```\r\n➜ /usr/bin/env Rscript --version\r\nR scripting front-end version 3.5.2 (2018-12-20)\r\n\r\n➜ R\r\n\r\nR version 3.5.2 (2018-12-20) -- \"Eggshell Igloo\"\r\nCopyright (C) 2018 The R Foundation for Statistical Computing\r\nPlatform: x86_64-apple-darwin17.7.0 (64-bit)\r\n\r\nR is free software and comes with ABSOLUTELY NO WARRANTY.\r\nYou are welcome to redistribute it under certain conditions.\r\nType 'license()' or 'licence()' for distribution details.\r\n\r\n  Natural language support but running in an English locale\r\n\r\nR is a collaborative project with many contributors.\r\nType 'contributors()' for more information and\r\n'citation()' on how to cite R or R packages in publications.\r\n\r\nType 'demo()' for some demos, 'help()' for on-line help, or\r\n'help.start()' for an HTML browser interface to help.\r\nType 'q()' to quit R.\r\n\r\nError in !packrat::opts$symlink.system.packages() : invalid argument type\r\n[Previously saved workspace restored]\r\n```"},"comment":{"url":"https://api.github.com/repos/rstudio/packrat/issues/comments/451524611","html_url":"https://github.com/rstudio/packrat/issues/524#issuecomment-451524611","issue_url":"https://api.github.com/repos/rstudio/packrat/issues/524","id":451524611,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTUyNDYxMQ==","user":{"login":"slhck","id":582444,"node_id":"MDQ6VXNlcjU4MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/582444?v=4","gravatar_id":"","url":"https://api.github.com/users/slhck","html_url":"https://github.com/slhck","followers_url":"https://api.github.com/users/slhck/followers","following_url":"https://api.github.com/users/slhck/following{/other_user}","gists_url":"https://api.github.com/users/slhck/gists{/gist_id}","starred_url":"https://api.github.com/users/slhck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slhck/subscriptions","organizations_url":"https://api.github.com/users/slhck/orgs","repos_url":"https://api.github.com/users/slhck/repos","events_url":"https://api.github.com/users/slhck/events{/privacy}","received_events_url":"https://api.github.com/users/slhck/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T18:17:29Z","updated_at":"2019-01-04T18:17:29Z","author_association":"NONE","body":"Try:\r\n\r\n```\r\nrm -rf packrat/src packrat/lib*\r\n```\r\n\r\nThen open R:\r\n\r\n```\r\ninstall.packages(\"devtools\")\r\ndevtools::install_github(\"rstudio/packrat\")\r\nlibrary(packrat)\r\npackrat::set_opts(symlink.system.packages = TRUE)\r\npackrat::restore()\r\n```\r\n\r\nOr manually fix your `packrat.opts`:\r\n\r\n```\r\necho \"symlink.system.packages: TRUE\" >> packrat/packrat.opts\r\n```\r\n\r\nThis did the trick for me (hopefully)."}}
{"actor":{"display_login":"slhck"}}