I get the following error message when trying to install package "rChart" in R:
**Installation failed: cannot change working directory**
Somebody advised me to install "Rcpp" before "rChart". So I did so.
However, it is still same before.
> install_github("saurfang/rCharts", ref = "utf8-writelines")
Downloading GitHub repo saurfang/rCharts#utf8-writelines
from URL https://api.github.com/repos/saurfang/rCharts/zipball/utf8-writelines
Installing rCharts
"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/Administrator/AppData/Local/Temp/RtmpCYR9NS/devtools246c28fe1bc3/saurfang-rCharts-e0106ed" \
--library="C:/Users/Administrator/Documents/R/win-library/3.4" --install-tests
**Installation failed: cannot change working directory**
Related
I am trying to install RopenCVLite, working in window os.
I am working in RStudio 3.5.0 in a Windows 7, 64-bit environment.
I am following the installation process tutorial
https://swarm-lab.github.io/ROpenCVLite/articles/install.html
First I have installed Cmake on my computer.
Then I tried to run below code in R, to install "RopenCVLite"
install.packages("pkgbuild") # pkgbuild is not available (for R version 3.5.0)
install.packages("devtools") # make sure you have the latest version from CRAN
library(devtools) # load package
devtools::install_github("r-lib/pkgbuild") # install updated version of pkgbuild from GitHub
library(pkgbuild) # load package
find_rtools() # should be TRUE, assuming you have Rtools 3.5
devtools::install_github("swarm-lab/ROpenCVLite")
I am getting following error
> devtools::install_github("swarm-lab/ROpenCVLite")
Downloading GitHub repo swarm-lab/ROpenCVLite#master
from URL https://api.github.com/repos/swarm-lab/ROpenCVLite/zipball/master
Installing ROpenCVLite
"C:/MANUAL~1/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD \
INSTALL \
"C:/Users/dell/AppData/Local/Temp/Rtmps5sa30/devtools1798506c6333/swarm-lab-ROpenCVLite-b9fcf19" \
--library="C:/Manually saved/R-3.5.0/library" --install-tests
* installing *source* package 'ROpenCVLite' ...
+ set -e
+ mkdir inst/tmp
+ mkdir inst/opencv/
+ cd inst/tmp/
+ Rscript -e 'download.file("https://github.com/opencv/opencv/archive/3.4.1.tar.gz", "opencv-3.4.1.tar.gz")'
trying URL 'https://github.com/opencv/opencv/archive/3.4.1.tar.gz'
Content type 'application/x-gzip' length 87051748 bytes (83.0 MB)
==================================================
downloaded 83.0 MB
+ tar zxvf opencv-3.4.1.tar.gz
+ cp ../cap_dshow.cpp opencv-3.4.1/modules/videoio/src/
+ cd opencv-3.4.1
+ '[' -d C:/MANUAL~1/R-35~1.0/bin/x64 ']'
+ mkdir build64
+ cd build64
+ cmake -G 'Unix Makefiles' -DCMAKE_C_COMPILER=C:/Rtools/mingw_64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/Rtools/mingw_64/bin/g++.exe -DCMAKE_RC_COMPILER=C:/Rtools/mingw_64/bin/windres.exe -DCMAKE_MAKE_PROGRAM=C:/Rtools/bin/make.exe -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DBUILD_matlab=OFF -DPYTHON_EXECUTABLE=OFF -DBUILD_opencv_photo=OFF -DBUILD_PROTOBUF=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=../../../opencv/ ../
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
CMake Error: Error executing cmake::LoadCache(). Aborting.
ERROR: configuration failed for package 'ROpenCVLite'
* removing 'C:/Manually saved/R-3.5.0/library/ROpenCVLite'
In R CMD INSTALL
Installation failed: Command failed (1)
Any suggestion is always appreciated.
Avjit,hope this still help you install ROpenCVLite. I encountered similar error issue just today and it shows
cmake: not found
I was able to figure out and the reason why install is failing when using command:
devtools::install_github("swarm-lab/ROpenCVLite")
it's because when you install cmake, it create its own Path folder under Program Files (on my machine). The sequence should be to install Rtools first on the root folder C such as this:
C:\Rtools
After installation, then install CMake but need to change the Path folder to C:\Rtools, it will create and install CMake under Rtools. This installation message is how I figured out the sequence. THe script is looking at CMake under the Rtools folder:
+ cmake -G 'Unix Makefiles' -DCMAKE_C_COMPILER=C:/Rtools/mingw_64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/Rtools/mingw_64/bin/g++.exe -DCMAKE_RC_COMPILER=C:/Rtools/mingw_64/bin/windres.exe -DCMAKE_MAKE_PROGRAM=C:/Rtools/bin/make.exe -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DBUILD_matlab=OFF -DPYTHON_EXECUTABLE=OFF -DBUILD_opencv_photo=OFF -DBUILD_PROTOBUF=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=../../../opencv/ ../
CMake Error: Could not find CMAKE_ROOT !!!
You should be able to install ROpenCVLite without any issue. Hope this helps and if so, kindly put a check mark.
At the company I work for we are trying to advance our GTFS capabilities and I can across the GTFSR library, which got me very excited!
Being quite new to R it took me awhile to figure out I needed to install devtools, unfortunately, even after installing devtools, I get the following error:
devtools::install_github('ropenscilabs/gtfsr')
Downloading GitHub repo ropenscilabs/gtfsr#master
from URL
https://api.github.com/repos/ropenscilabs/gtfsr/zipball/master
Installing gtfsr Downloading GitHub repo rstudio/leaflet#master from
URL https://api.github.com/repos/rstudio/leaflet/zipball/master
Installing leaflet "C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file
--no-environ --no-save --no-restore --quiet CMD INSTALL \ "C:/Users/Username/AppData/Local/Temp/RtmpMr0ZUc/devtools2b9c242555c/rstudio-leaflet-6aa608f"
--library="C:/Program \ Files/R/R-3.4.4/library" --install-tests
In R CMD INSTALL Installation failed: Command failed (65535)
"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ
--no-save --no-restore --quiet CMD INSTALL \ "C:/Users/Username/AppData/Local/Temp/RtmpMr0ZUc/devtools2b9c2a431852/ropensci-gtfsr-3af920a"
--library="C:/Program \ Files/R/R-3.4.4/library" --install-tests
In R CMD INSTALL Installation failed: Command failed (65535)
library(gtfsr)
Error in library(gtfsr) : there is no package called ‘gtfsr’
I never did determine what the issue was but I ended up uninstalling RStudio (and all packages) and reinstalled. I installed GTFSR by itself and it worked fine.
I wonder if maybe I had a conflicting package or an unsupported version.
Thanks everyone.
I am trying to install rPython but I get the following error about the scrdir installation. The scr file (makevars.win), as well as the configure.win file have the same path.
The path I am using is:
#!/bin/sh
echo PKG_LIBS=-LD:/Programs/Python27/libs -lpython27
echo PKG_CFLAGS=-I"D:/Programs/Python27/include"
And this is the error I get on R.
install("D:/Programs/R-3.4.2/library/rPython")
Installing rPython
"D:/Programs/R-3.4.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"D:/Programs/R-3.4.2/library/rPython" --library="D:/Programs/R-3.4.2/library" --install-tests
ERROR: cannot install to srcdir for package 'rPython'
* removing 'D:/Programs/R-3.4.2/library/rPython'
Error: Command failed (1)
I am using a windows 10 machine 64 bits. Any suggestions?
I managed to solve this issue by adding "C:/Rtools" to the variable Path in the "environment variables" of my computer.
I'm trying to install h2oEnsemble package on R 3.2.3. I have H2O 3.10.0.8 package. When I write these commands:
library(devtools)
install_github("h2oai/h2o-3/h2o-r/ensemble/h2oEnsemble-package")
I get the next error:
Downloading GitHub repo h2oai/h2o-3#master
from URL https://api.github.com/repos/h2oai/h2o-3/zipball/master
Installing h2oEnsemble
"C:/Program Files/R/R-3.2.3/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/User/AppData/Local/Temp/Rtmpi0Q2AV/devtools9583548338a/h2oai-h2o-3-a0a4bbc/h2o-r/ensemble/h2oEnsemble-package" \
--library="C:/Users/User/Documents/R/win-library/3.2" --install-tests
"C:\Program" Ҝ пү«пҜвбп үгваҜҜ© Ё«Ё үҜиҜ©
Ө®¬ ¤®©, ЁбÜ®«пҜ¬®© Üа®Ҹа ¬¬®© Ё«Ё Ü ӨҜвл¬ д ©«®¬.
Error: Command failed (1)
Please, help me to solve this problem. Thanks.
It seems, your error is :
'C:\Program' is not recognized as an internal or external command,
operable program or batch file. Error: Command failed (1)
It happens due to the space character in location path (C:\Program Files) path. According to the documentation,
If you want to be able to build packages from sources, we recommend that you choose an
installation path not containing spaces.
Please refer the link : How do I install R for Windows?
Try changing the installation location. Then it should work fine.
I've tried for ages to install 'rsconnect' with the command
devtools::install_github('rstudio/shinyapps')
but failed with the message below.
Downloading GitHub repo rstudio/shinyapps#master
from URL https://api.github.com/repos/rstudio/shinyapps/zipball/master
Installing shinyapps
"C:/Program Files/R/R-3.2.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/Flora/AppData/Local/Temp/RtmpsPtNWD/devtools20343ed16b87/rstudio-shinyapps-4dd3a9d" --library="C:/Program \
Files/R/R-3.2.3/library" --install-tests
Error: Command failed (1)
I've tried
devtools::install_github('rstudio/shinyapps')
also, but failed with the exactly same message.
Can anybody help me with this please?
Many thanks in advance! :)
Try this -
if (!require("devtools"))
install.packages("devtools")
devtools::install_github("rstudio/rsconnect")