cannot open file 'packrat/init.R': No such file or directory in docker container.
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I want to use packrat to restore a R environment inside a docker container which gets deployed in openshift. So the commands I run are
Rscript -e "packrat::restore()"
and then I want to install another package
Rscript -e 'install.packages("jsonlite")'
which leads to the following output and error.
sh-4.2$ R
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Packrat mode on. Using library in directory:
- "/opt/app-root/src/packrat/lib"
> install.packages("jsonlite")
Installing package into ‘/opt/app-root/src/packrat/lib/x86_64-redhat-linux-gnu/3.5.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/jsonlite_1.5.tar.gz'
Content type 'application/x-gzip' length 1096810 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c base64.c -o base64.o
Killed
sh-4.2$ gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -g
-m64 -mtune=generic -c collapse_array.c -o collapse_array.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c collapse_object.c -o collapse_object.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c collapse_pretty.c -o collapse_pretty.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c escape_chars.c -o escape_chars.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c integer64_to_na.c -o integer64_to_na.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c is_datelist.c -o is_datelist.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c is_recordlist.c -o is_recordlist.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c is_scalarlist.c -o is_scalarlist.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c modp_numtoa.c -o modp_numtoa.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c null_to_na.c -o null_to_na.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c num_to_char.c -o num_to_char.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c parse.c -o parse.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c prettify.c -o prettify.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c push_parser.c -o push_parser.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c r-base64.c -o r-base64.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c register.c -o register.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c row_collapse.c -o row_collapse.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c transpose_list.c -o transpose_list.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c validate.c -o validate.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl.c -o yajl/yajl.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_alloc.c -o yajl/yajl_alloc.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_buf.c -o yajl/yajl_buf.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_encode.c -o yajl/yajl_encode.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_gen.c -o yajl/yajl_gen.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_lex.c -o yajl/yajl_lex.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_parser.c -o yajl/yajl_parser.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-g
mtune=generic -c yajl/yajl_tree.c -o yajl/yajl_tree.o
ar rcs libstatyajl.a yajl/yajl.o yajl/yajl_alloc.o yajl/yajl_buf.o yajl/yajl_encode.o yajl/yajl_gen.o yajl/yajl_lex.o yajl/yajl_parser.o yajl/yajl_tree.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o jsonlite.so base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scal
.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o -L. -lstatyajl -L/usr/lib64/R/lib -lR
installing to /opt/app-root/src/packrat/lib/x86_64-redhat-linux-gnu/3.5.0/jsonlite/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
Warning in file.copy(file.path(R.home("doc"), "html", "R.css"), outman) :
problem copying /usr/share/doc/R-3.5.0/html/R.css to /opt/app-root/src/packrat/lib/x86_64-redhat-linux-gnu/3.5.0/jsonlite/html/R.css: No such file or directory
converting help for package ‘jsonlite’
finding HTML links ... done
base64 html
flatten html
fromJSON html
prettify html
rbind_pages html
Rd warning: /tmp/RtmpmcGHc8/R.INSTALL3315498b62/jsonlite/man/rbind_pages.Rd:22: file link ‘rbind’ in package ‘base’ does not exist and so has been treated as a topic
read_json html
serializeJSON html
stream_in html
unbox html
validate html
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
Calls: source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file 'packrat/init.R': No such file or directory
Execution halted
ERROR: loading failed
* removing ‘/opt/app-root/src/packrat/lib/x86_64-redhat-linux-gnu/3.5.0/jsonlite’
The same message appears when I open a bash session inside the docker container and try to install the package with an interactive R session. Any idea what is wrong and what I can do to start troubleshooting?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported sequence, Rscript -e "packrat::restore()" followed by install.packages("jsonlite"), inside the Docker container. Inspect the packrat/init.R path and the shown gcc compilation failure, then determine whether the missing file or the killed compilation is the actionable problem. Done means the container can restore the environment and install jsonlite successfully, with the failure cause documented or fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, r
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100