Error in installing image.darknet in R

I am having a problem in installing the image.darknet. I want to use its feature for the assignment given to us by our professor. The guide that I used in installing that package was from
Object Detection with R on Windows - Tomaž Weiss (tomazweiss.github.io)

Now, when I tried to run the

devtools::install_github("bnosac/image", subdir = "image.darknet", build_vignettes = TRUE)

I got this error.

> devtools::install_github("bnosac/image", subdir = "image.darknet", build_vignettes = TRUE)
Downloading GitHub repo bnosac/image@HEAD
√  checking for file 'C:\Users\king\AppData\Local\Temp\Rtmp0COUlR\remotes167c22544bd\bnosac-image-1dd70d0\image.darknet/DESCRIPTION' ...
-  preparing 'image.darknet': (3.6s)
√  checking DESCRIPTION meta-information ...
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories (511ms)
-  building 'image.darknet_0.1.0.tar.gz'
   
* installing *source* package 'image.darknet' ...
** using staged installation
** libs
"C:/Program Files/R/rtools40//mingw64/bin/"gcc  -I"C:/PROGRA~1/R/R-40~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c __R_API_classifier.c -o __R_API_classifier.o
sh: line 1: C:/Program Files/R/rtools40//mingw64/bin/gcc: No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.3/etc/x64/Makeconf:222: __R_API_classifier.o] Error 127
ERROR: compilation failed for package 'image.darknet'
* removing 'C:/Program Files/R/R-4.0.3/library/image.darknet'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/king/AppData/Local/Temp/Rtmp0COUlR/file167c30171f0d/image.darknet_0.1.0.tar.gz’ had non-zero exit status

Any help will be much more appreciated. Because I badly needed this thing. Thank you.

This suggests you don't have RTools40 properly installed in your system, this is a separate software that you need to install in your system in order to compile packages from source, you can download it from here

https://cran.r-project.org/bin/windows/Rtools/rtools40.html

1 Like

Thank you so much it worked. You save my day. I am just so new in R and do not know about that thing.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.