下载R软件包时出现问题:“*”。o:文件格式不可识别“;

下载R软件包时出现问题:“*”。o:文件格式不可识别“;,r,github,package,rtools,R,Github,Package,Rtools,我正试图安装这个,但没有用。我已经安装了最新版本的devtools和Rtools 3.5(我已经确保添加了环境变量的路径)。我尝试过使用install\u github和install\u local,但没有成功 > devtools::install_local("C:\\Users\\Alex\\Desktop\\SurvivalCausalTree-master.zip") Installing package into ‘C:/Users/Alex/R/win-library/3.

我正试图安装这个,但没有用。我已经安装了最新版本的devtools和Rtools 3.5(我已经确保添加了环境变量的路径)。我尝试过使用
install\u github
install\u local
,但没有成功

> devtools::install_local("C:\\Users\\Alex\\Desktop\\SurvivalCausalTree-master.zip")
Installing package into ‘C:/Users/Alex/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package 'survivalCausalTree' ...
** libs

*** arch - i386
C:\Rtools\mingw_32\bin\nm.exe: CT.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: CTA_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: CTD.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: CTH_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: anova.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: anovapred.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: branch.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: bsplit.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: causalTree.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: causalTree_callback.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: choose_surg.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: estimate_causalTree.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: fit.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: fitA_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: fitD.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: fitH_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: fix_cp.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: free_tree.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: graycode.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: honest_estimate_causalTree.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: init.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: insert_split.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: make_cp_list.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: make_cp_table.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: matching_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: mysort.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: myxval.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: nodesplit.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: partition.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: pred_causalTree.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: print_tree.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: rpcountup.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: rpmatrix.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: surrogate.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: tot.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: totD.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: totrundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: tstats.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: tstatsD.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: user.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: user2.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: user3.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: user4.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: user5.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: userA_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: userD.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: userH_rundown.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: usersplit.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: xevals.o: File format not recognized
C:\Rtools\mingw_32\bin\nm.exe: xvalHelper.o: File format not recognized
c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o survivalCausalTree.dll tmp.def CT.o CTA_rundown.o CTD.o CTH_rundown.o anova.o anovapred.o branch.o bsplit.o causalTree.o causalTree_callback.o choose_surg.o estimate_causalTree.o fit.o fitA_rundown.o fitD.o fitH_rundown.o fix_cp.o free_tree.o graycode.o honest_estimate_causalTree.o init.o insert_split.o make_cp_list.o make_cp_table.o matching_rundown.o mysort.o myxval.o nodesplit.o partition.o pred_causalTree.o print_tree.o rpcountup.o rpmatrix.o surrogate.o tot.o totD.o totrundown.o tstats.o tstatsD.o user.o user2.o user3.o user4.o user5.o userA_rundown.o userD.o userH_rundown.o usersplit.o xevals.o xvalHelper.o -LC:/PROGRA~1/R/R-35~1.2/bin/i386 -lR
CT.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
installing to C:/Users/Alex/R/win-library/3.5/survivalCausalTree/libs/i386

*** arch - x64
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o survivalCausalTree.dll tmp.def CT.o CTA_rundown.o CTD.o CTH_rundown.o anova.o anovapred.o branch.o bsplit.o causalTree.o causalTree_callback.o choose_surg.o estimate_causalTree.o fit.o fitA_rundown.o fitD.o fitH_rundown.o fix_cp.o free_tree.o graycode.o honest_estimate_causalTree.o init.o insert_split.o make_cp_list.o make_cp_table.o matching_rundown.o mysort.o myxval.o nodesplit.o partition.o pred_causalTree.o print_tree.o rpcountup.o rpmatrix.o surrogate.o tot.o totD.o totrundown.o tstats.o tstatsD.o user.o user2.o user3.o user4.o user5.o userA_rundown.o userD.o userH_rundown.o usersplit.o xevals.o xvalHelper.o -LC:/PROGRA~1/R/R-35~1.2/bin/x64 -lR
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CT.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTA_rundown.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTA_rundown.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTA_rundown.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTD.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTH_rundown.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTH_rundown.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: CTH_rundown.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: branch.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: bsplit.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: bsplit.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: bsplit.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: bsplit.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: bsplit.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: bsplit.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: causalTree.o: invalid relocation type 42
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: BFD (GNU Binutils) 2.25 assertion fail ../../../src/binutils-2.25/bfd/elf64-x86-64.c:341
causalTree.o: In function `causalTree':
/home/skywalkerzwj/Dropbox/Code/SCT2/src/causalTree.c:99: Cannot get section contents - auto-import exception
collect2.exe: error: ld returned 5 exit status
installing to C:/Users/Alex/R/win-library/3.5/survivalCausalTree/libs/x64
** R
** byte-compile and prepare package for lazy loading
** help
No man pages found in package  'survivalCausalTree' 
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error: package or namespace load failed for 'survivalCausalTree' in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/Users/Alex/R/win-library/3.5/survivalCausalTree/libs/i386/causalTree.dll':
  LoadLibrary failure:  %1 is not a valid Win32 application.

Error: loading failed
Execution halted
*** arch - x64
Error: package or namespace load failed for 'survivalCausalTree' in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/Users/Alex/R/win-library/3.5/survivalCausalTree/libs/x64/causalTree.dll':
  LoadLibrary failure:  %1 is not a valid Win32 application.

Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Alex/R/win-library/3.5/survivalCausalTree'
In R CMD INSTALL
Error in i.p(...) : 
  (converted from warning) installation of package ‘C:/Users/Alex/AppData/Local/Temp/Rtmpkx2wAs/remotes2da46d9a7dbd/SurvivalCausalTree-master’ had non-zero exit status
有关我的R的详细信息:

> R.version
               _                           
platform       i386-w64-mingw32            
arch           i386                        
os             mingw32                     
system         i386, mingw32               
status                                     
major          3                           
minor          5.2                         
year           2018                        
month          12                          
day            20                          
svn rev        75870                       
language       R                           
version.string R version 3.5.2 (2018-12-20)
nickname       Eggshell Igloo    
如果有人能给我指出正确的方向,我将非常感激。谢谢大家!

可能类似于:

我已经更新了repo(从我的Linux版本中排除了
.o
.so
),现在在一个新安装上它编译库。
你能再试一次吗

如中所示,尝试忽略*.o并从克隆的存储库中删除它们