I want to install the data.table library in R, but I have problems. When I type
安装。
it tells me that I have to compile the library from source. If I say yes, my C compiler starts running until the error message comes that <zlib.h> was not found.
因此,我还试图安装Szlib.h图书馆(使用MSYS2),但似乎没有任何用途。
我的完全产出如下:
imelf@DESKTOP-CFHKUQA MINGW32 /d/Informatik/NachhilfeInfoUni/SteuberHenry/DataAnalysis
$ pacman -S mingw-w64-i686-zlib
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-i686-zlib-1.3.1-1
Total Download Size: 0.10 MiB
Total Installed Size: 0.40 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
mingw-w64-i686-zlib-1.3.1-... 103.3 KiB 294 KiB/s 00:00 [###############################] 100%
(1/1) checking keys in keyring [###############################] 100%
(1/1) checking package integrity [###############################] 100%
(1/1) loading package files [###############################] 100%
(1/1) checking for file conflicts [###############################] 100%
(1/1) checking available disk space [###############################] 100%
:: Processing package changes...
(1/1) upgrading mingw-w64-i686-zlib [###############################] 100%
imelf@DESKTOP-CFHKUQA MINGW32 /d/Informatik/NachhilfeInfoUni/SteuberHenry/DataAnalysis
$ r
R version 4.2.0 (2022-04-22 ucrt) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type license() or licence() for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type contributors() for more information and
citation() on how to cite R or R packages in publications.
Type demo() for some demos, help() for on-line help, or
help.start() for an HTML browser interface to help.
Type q() to quit R.
> 安装。;
Installing package into C:/Users/imelf/AppData/Local/R/win-library/4.2
(as lib is unspecified)
--- Please select a CRAN mirror for use in this session ---
There is a binary version available but the source version is later:
binary source needs_compilation
data.table 1.15.2 1.15.4 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel)$
$$
installing the source package data.table
trying URL https://ftp.gwdg.de/pub/misc/cran/src/contrib/data.table_1.15.4.tar.gz
Content type application/octet-stream length 5387593 bytes (5.1 MB)
downloaded 5.1 MB
* installing *source* package data.table ...
** package data.table successfully unpacked and MD5 sums checked
** using staged installation
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c assign.c -o assign.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c between.c -o between.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c bmerge.c -o bmerge.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c chmatch.c -o chmatch.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c cj.c -o cj.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c coalesce.c -o coalesce.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dogroups.c -o dogroups.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fastmean.c -o fastmean.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fcast.c -o fcast.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fifelse.c -o fifelse.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fmelt.c -o fmelt.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c forder.c -o forder.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c frank.c -o frank.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fread.c -o fread.o
In file included from fread.c:21:
fread.c: In function ‘freadMain’:
fread.c:1291:21: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1291 | if (isspace(ch[0]) || isspace(ch[nchar-1]))
| ~~^~~
fread.c:1291:39: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1291 | if (isspace(ch[0]) || isspace(ch[nchar-1]))
| ~~^~~~~~~~~
fread.c:1487:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1487 | while (++ch<eof && isspace(*ch)) {};
| ^~~
fread.c:1570:29: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1570 | while (ch<eof && (isspace(*ch) || *ch== )) { // isspace matches , ,
and
; before eof should be skipped too
| ^~~
fread.c:2588:30: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2588 | while (ch<eof && isspace(*ch)) ch++;
| ^~~
fread.c:2595:32: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2595 | while (ch<eof && isspace(*ch)) ch++;
| ^~~
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c freadR.c -o freadR.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c froll.c -o froll.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c frollR.c -o frollR.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c frolladaptive.c -o frolladaptive.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fsort.c -o fsort.o
gcc -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -fopenmp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fwrite.c -o fwrite.o
fwrite.c:11:10: fatal error: zlib.h: No such file or directory
11 | #include <zlib.h> // for compression to .gz
| ^~~~~~~~
compilation terminated.
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:252: fwrite.o] Error 1
ERROR: compilation failed for package data.table
* removing C:/Users/imelf/AppData/Local/R/win-library/4.2/data.table
The downloaded source packages are in
C:UsersimelfAppDataLocalTempRtmpmWL9psdownloaded_packages
Warning message:
In 安装。 :
installation of package data.table had non-zero exit status
>
谁能帮助这里?