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

Install package failure on Windows10 #654

Closed
ChenJiyangOnline opened this issue Jul 30, 2023 · 3 comments
Closed

Install package failure on Windows10 #654

ChenJiyangOnline opened this issue Jul 30, 2023 · 3 comments

Comments

@ChenJiyangOnline
Copy link

ChenJiyangOnline commented Jul 30, 2023

My Env is as follows:
The R.version is 4.3.0.
The Rtools version is Rtools43.
The NMF version is 0.26.
The circlize version is 0.4.16.
The ComplexHeatmap version is 2.25.4.

First I tried devtools::install_github("sqjin/CellChat") and continue with the following error:

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

Then I download the 'sqjin-CellChat-v1.5.0-29-g7ee94c3.tar.gz' from 'https://api.github.com/repos/sqjin/CellChat/tarball/HEAD' and attempt to install with command install.packages("C:/Users/Administrator/Desktop/sqjin-CellChat-v1.5.0-29-g7ee94c3.tar.gz", repos = NULL, type = "source")
However, the following erorr was reportted:

Warning in untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
* installing *source* package 'CellChat' ...
** using staged installation
** libs
using C++ compiler: 'g++.exe (GCC) 12.2.0'
F:\rtools43\x86_64-w64-mingw32.static.posix\bin\nm.exe: CellChat_Rcpp.o: file format not recognized
F:\rtools43\x86_64-w64-mingw32.static.posix\bin\nm.exe: RcppExports.o: file format not recognized
g++ -std=gnu++17 -shared -s -static-libgcc -o CellChat.dll tmp.def CellChat_Rcpp.o RcppExports.o -LF:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LF:/rtools43/x86_64-w64-mingw32.static.posix/lib -LF:/R-4.3.0/bin/x64 -lR
CellChat_Rcpp.o: file not recognized: file format not recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'CellChat'
* removing 'F:/R-4.3.0/library/CellChat'
Warning in install.packages :
  installation of package ‘C:/Users/Administrator/Desktop/sqjin-CellChat-v1.5.0-29-g7ee94c3.tar.gz’ had non-zero exit status

I searched the ERROR solution. But I can't find *.o file under the specified path.
I have no idea how to fix this issue. If anyone can help I will pretty appreciate it.
image

@sqjin
Copy link
Owner

sqjin commented Jul 30, 2023

@ChenJiyangOnline Other users reported this issue before. Briefly,
Download the repository and locally install it, but the *.so and *.o files in the src directory should be removed before installing .

@hyjforesight
Copy link

@ChenJiyangOnline Other users reported this issue before. Briefly, Download the repository and locally install it, but the *.so and *.o files in the src directory should be removed before installing .

Though it's tough to install packages in China, this solution is exactly right. I download zip from github. Unzip it. Delete *.o and *.so files. Compress the folder into tar.gz and install it locally by R studio. It worked.
image

@ChenJiyangOnline
Copy link
Author

Your feedback is incredibly valuable and plays a crucial role in troubleshooting errors.
As for offline installation of the CellChat-master.tar.gz, apologies, I forgot to capture a screenshot of the failure (so I am not sure whether I make something wrong or it doesn't run. Firstly I tried CellChat-master.tar.gz, the clone of the github restorage. Then is the sqjin-CellChat-v1.5.0-29-g7ee94c3.tar.gz)
As for the *.o and *.so files, I used Listary for globakl search, but didn't yield any results, making me suspect an issue with my computer. (But I forget to remain the screenshot of global search yet..... Sincere apologies for my incaution).
Interestingly, I stumbled upon a new issue where the devtools::install_github() command failed, but remote::intstall_github() succeeded. I managed to get CellChat installed with remotes::install_github("sqjin/CellChat"). I'll investigate my devtools installation later.
In summary, your assistance is greatly appreciated, and I'm thankful for your support!

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

3 participants