Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Install Package fail on windows. (file format not recognized) #5

Open
imchangchang opened this issue Jul 29, 2020 · 13 comments
Open

Install Package fail on windows. (file format not recognized) #5

imchangchang opened this issue Jul 29, 2020 · 13 comments

Comments

@imchangchang
Copy link

Hello, I tried to install this package with R stdio on windows7, but failed with the following message:

c:\rtools40\mingw64\bin\nm.exe: CellChat_Rcpp.o: file format not recognized
......

I notice that the files under src folder are *.o and *.so, which are not windows file type. The right windows file type should be *.obj and *.dll.

Is there something wrong with my operation or this package can not install on windows?

@sqjin
Copy link
Owner

sqjin commented Jul 29, 2020

@imchangchang Hello, I have successfully installed CellChat on Windows 10. I think windows 7 might be too old. CellChat_Rcpp.o is the complied C++ code. You might need to figure out how to compile C++ code with R for Windows. This website might be helpful.

@imchangchang
Copy link
Author

@sqjin thanks!
I just delete the *.o files and the *.so file, and reinstall CellChat. I saw the cpp files recompiled and generated a CellChat.dll file.
I think I made it :)

@sdhbiusdgb
Copy link

Hello, I tried to install this package with R studio on windows10, but failed with the following message:
ERROR: dependency 'BiocNeighbors' is not available for package 'CellChat'

@sqjin
Copy link
Owner

sqjin commented Jun 24, 2023 via email

@Fsrgsr
Copy link

Fsrgsr commented Jul 1, 2023

Hello,I tried to install this package with R studio on windows10,and i installed the lasted version of NMF, circlize and ComplexHeatmap. But i still can`t install CellChat successfully.
Warning message:In i.p(...) :
The value of the exit status when installing the package "C:/Users/gsrfs/AppData/Local/Temp/RtmpUVa2em/file582024621d28/CellChat_1.6.1.tar.gz" is not 0.

@Ghadeer98
Copy link

Ghadeer98 commented Sep 10, 2023

Hello, I am trying to install this package with R studio on (Windows 10), and I installed the lasted version of NMF, circlize, and ComplexHeatmap. But I am still receiving the same error message, which is:
(Error in library(CellChat, warn.conflicts = FALSE) :
there is no package called ‘CellChat’)

@sqjin
Copy link
Owner

sqjin commented Sep 10, 2023

@Ghadeer98 Have you downloaded the source codes locally and delete the *.o files and the *.so file, and reinstall CellChat.

@Ghadeer98
Copy link

I don't know exactly what you mean by locally but here (in the attached figure) is the code that I run on R studio's script
image

@Ghadeer98
Copy link

Ghadeer98 commented Sep 15, 2023

when I run this code (devtools::install_github("sqjin/CellChat")), i got this message (not the whole message, it is cropped):

Warning: Fortran 2018 deleted feature: Shared DO termination label 60 at (1)
g++ -std=gnu++17 -shared -s -static-libgcc -o minqa.dll tmp.def altmov.o bigden.o biglag.o bobyqa.o bobyqb.o lagmax.o minqa.o newuoa.o newuob.o prelim.o rescue.o trsapp.o trsbox.o trstep.o uobyqa.o uobyqb.o update.o updatebobyqa.o -LC:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib -lgfortran -lm -lquadmath -LC:/PROGRA1/R/R-431.1/bin/x64 -lR
installing to C:/Users/user/AppData/Local/R/win-library/4.3/00LOCK-minqa/00new/minqa/libs/x64
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • DONE (minqa)
  • installing source package 'reticulate' ...
    ** package 'reticulate' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C++ compiler: 'G__1.EXE (GCC) 12.2.0'
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c event_loop.cpp -o event_loop.o
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c libpython.cpp -o libpython.o
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c output.cpp -o output.o
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c python.cpp -o python.o
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c readline.cpp -o readline.o
    g++ -std=gnu++17 -I"C:/PROGRA
    1/R/R-431.1/include" -DNDEBUG -I'C:/Users/user/AppData/Local/R/win-library/4.3/Rcpp/include' -I"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c signals.cpp -o signals.o
    g++ -std=gnu++17 -shared -s -static-libgcc -o reticulate.dll tmp.def RcppExports.o event_loop.o libpython.o output.o python.o readline.o signals.o -LC:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA
    1/R/R-43~1.1/bin/x64 -lR
    installing to C:/Users/user/AppData/Local/R/win-library/4.3/00LOCK-reticulate/00new/reticulate/libs/x64
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
  • DONE (reticulate)

The downloaded source packages are in
‘C:\Users\user\AppData\Local\Temp\RtmpCMkhcl\downloaded_packages’
── R CMD build ───────────────────────────────────────────────────────────────────────────────
✔ checking for file 'C:\Users\user\AppData\Local\Temp\RtmpCMkhcl\remotes12c024231f30\sqjin-CellChat-418b660/DESCRIPTION' (613ms)
─ preparing 'CellChat': (6.2s)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts (917ms)
─ checking for empty or unneeded directories
─ building 'CellChat_1.6.1.tar.gz'

Installing package into ‘C:/Users/user/AppData/Local/R/win-library/4.3’
(as ‘lib’ is unspecified)
ERROR: dependency 'BiocNeighbors' is not available for package 'CellChat'

  • removing 'C:/Users/user/AppData/Local/R/win-library/4.3/CellChat'
    Warning messages:
    1: package ‘BiocNeighbors’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
2: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Users\user\AppData\Local\R\win-library\4.3\00LOCK\dplyr\libs\x64\dplyr.dll to C:\Users\user\AppData\Local\R\win-library\4.3\dplyr\libs\x64\dplyr.dll: Permission denied
3: In i.p(...) :
installation of package ‘C:/Users/user/AppData/Local/Temp/RtmpCMkhcl/file12c044e2179f/CellChat_1.6.1.tar.gz’ had non-zero exit status

@Fantasythorn
Copy link

Hello, I am trying to install this package with R studio on (Windows 10), and I installed the lasted version of NMF, circlize, and ComplexHeatmap. But I am still receiving the same error message, which is:
Error: Failed to install 'CellChat-master.zip' from local:
Could not find tools necessary to compile a package

@yeaon615
Copy link

yeaon615 commented Oct 1, 2023

Hello, I am trying to install this package with R studio on (Windows 10), and I installed the lasted version of NMF, circlize, and ComplexHeatmap. But I am still receiving the same error message, which is: Error: Failed to install 'CellChat-master.zip' from local: Could not find tools necessary to compile a package

Hi. Did you solve the problem?I had the same problem.

@yeaon615
Copy link

yeaon615 commented Oct 1, 2023

Hello, I am trying to install this package with R studio on (Windows 10), and I installed the lasted version of NMF, circlize, and ComplexHeatmap. But I am still receiving the same error message, which is: Error: Failed to install 'CellChat-master.zip' from local: Could not find tools necessary to compile a package

Hi. I have solve the similar problem by downlown the right version of Rtools according to my R version( https://cloud.r-project.org/ ). If you need the Rtools version lower than 4.2, you need to put Rtools on the PATH after installation. details: https://cloud.r-project.org/

@huatiancuoledi
Copy link

devtools::install_github("sqjin/CellChat")
Downloading GitHub repo sqjin/CellChat@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/sqjin/CellChat/tarball/HEAD' failed
how can i solve this problem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants