首页 > 解决方案 > 安装包“Rhtslib”时出错

问题描述

我尝试安装 Rhtslib 包,但遇到了几个错误,包括:

我觉得可能有一些更大的潜在问题后来导致所有这些错误。有人可以帮我确定我哪里出错了吗?这是我尝试安装它时的输出:

install.packages("~/R/win-library/4.0/Rhtslib_1.22.0.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/Users/dell/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

installing source package 'Rhtslib' ...
** using non-staged installation via StagedInstall field
** libs
*** arch - i386
cd "htslib-1.7" && /usr/bin/make -f "C:/PROGRA1/R/R-401.2/etc/i386/Makeconf" -f "Makefile.Rhtslib.win"
make[1]: Entering directory '/c/Users/dell/AppData/Local/Temp/RtmpsTRXyv/R.INSTALL24fc3c222fea/Rhtslib/src-i386/htslib-1.7'
Makefile.Rhtslib.win:131: warning: overriding recipe for target '.c.o'
C:/PROGRA1/R/R-401.2/etc/i386/Makeconf:222: warning: ignoring old recipe for target '.c.o'
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o kfunc.o kfunc.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o knetfile.o knetfile.c
knetfile.c: In function 'khttp_connect_file':
knetfile.c:416:61: warning: unknown conversion type character 'l' in format [-Wformat=]
if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
^
knetfile.c:416:45: warning: too many arguments for format [-Wformat-extra-args]
if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
^~~~~~~~~~~~~~~~~~~~~~~~
knetfile.c:416:61: warning: unknown conversion type character 'l' in format [-Wformat=]
if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
^
knetfile.c:416:45: warning: too many arguments for format [-Wformat-extra-args]
if (fp->offset != 0) l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset);
^~~~~~~~~~~~~~~~~~~~~~~~
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o kstring.o kstring.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o bcf_sr_sort.o 

bcf_sr_sort.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o bgzf.o bgzf.c
In file included from htslib/hts.h:35,
from bgzf.c:38:
bgzf.c: In function 'bgzf_read':
bgzf.c:888:31: warning: unknown conversion type character 'z' in format [-Wformat=]
hts_log_error("Read block operation failed with error %d after %zd of %zu bytes", ret, bytes_read, length);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'
#define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, VA_ARGS)
^~~~~~~~~~~
bgzf.c:888:31: warning: unknown conversion type character 'z' in format [-Wformat=]
hts_log_error("Read block operation failed with error %d after %zd of %zu bytes", ret, bytes_read, length);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'
#define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, VA_ARGS)
^~~~~~~~~~~
bgzf.c:888:31: warning: too many arguments for format [-Wformat-extra-args]
hts_log_error("Read block operation failed with error %d after %zd of %zu bytes", ret, bytes_read, length);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'
#define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, VA_ARGS)
^~~~~~~~~~~
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o errmod.o errmod.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o faidx.o faidx.c
In file included from htslib/hts.h:35,
from hts_internal.h:29,
from faidx.c:43:
faidx.c: In function 'fai_read':
faidx.c:222:27: warning: unknown conversion type character 'z' in format [-Wformat=]
hts_log_error("Could not understand FAI %s line %zd", fname, lnum);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'
#define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, VA_ARGS)
^~~~~~~~~~~
faidx.c:222:27: warning: too many arguments for format [-Wformat-extra-args]
hts_log_error("Could not understand FAI %s line %zd", fname, lnum);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:75:61: note: in definition of macro 'hts_log_error'
#define hts_log_error(...) hts_log(HTS_LOG_ERROR, func, VA_ARGS)
^~~~~~~~~~~
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hfile.o hfile.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.7"' > version.h
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hts.o hts.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o hts_os.o hts_os.c
hts_os.c: In function 'hts_srand48':
hts_os.c:33:31: warning: implicit declaration of function 'srand48'; did you mean 'srand'? [-Wimplicit-function-declaration]
void hts_srand48(long seed) { srand48(seed); }
^~~~~~~
srand
hts_os.c: In function 'hts_erand48':
hts_os.c:34:54: warning: implicit declaration of function 'erand48'; did you mean 'srand'? [-Wimplicit-function-declaration]
double hts_erand48(unsigned short xseed[3]) { return erand48(xseed); }
^~~~~~~
srand
hts_os.c: In function 'hts_drand48':
hts_os.c:35:35: warning: implicit declaration of function 'drand48'; did you mean 'srand'? [-Wimplicit-function-declaration]
double hts_drand48(void) { return drand48(); }
^~~~~~~
srand
hts_os.c: In function 'hts_lrand48':
hts_os.c:36:35: warning: implicit declaration of function 'lrand48'; did you mean 'srand'? [-Wimplicit-function-declaration]
double hts_lrand48(void) { return lrand48(); }
^~~~~~~
srand
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o md5.o md5.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o multipart.o multipart.c
In file included from htslib/hts.h:35,
from hts_internal.h:29,
from multipart.c:33:
multipart.c: In function 'multipart_read':
multipart.c:81:27: warning: unknown conversion type character 'z' in format [-Wformat=]
hts_log_debug("Opening part #%zu of %zu: "%.120s%s"",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'
#define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, VA_ARGS)
^~~~~~~~~~~
multipart.c:81:27: warning: unknown conversion type character 'z' in format [-Wformat=]
hts_log_debug("Opening part #%zu of %zu: "%.120s%s"",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'
#define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, VA_ARGS)
^~~~~~~~~~~
multipart.c:81:27: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
hts_log_debug("Opening part #%zu of %zu: "%.120s%s"",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fp->current+1, fp->nparts, p->url,
~~~~~~~~~~~~~
htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'
#define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, VA_ARGS)
^~~~~~~~~~~
multipart.c:81:27: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
hts_log_debug("Opening part #%zu of %zu: "%.120s%s"",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fp->current+1, fp->nparts, p->url,
~~~~~~~~~~
htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'
#define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, VA_ARGS)
^~~~~~~~~~~
multipart.c:81:27: warning: too many arguments for format [-Wformat-extra-args]
hts_log_debug("Opening part #%zu of %zu: "%.120s%s"",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:84:61: note: in definition of macro 'hts_log_debug'
#define hts_log_debug(...) hts_log(HTS_LOG_DEBUG, func, VA_ARGS)
^~~~~~~~~~~
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o probaln.o probaln.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o realn.o realn.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o regidx.o regidx.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o sam.o sam.c
In file included from htslib/hts.h:35,
from htslib/sam.h:31,
from sam.c:35:
sam.c: In function 'sam_read1':
sam.c:1439:29: warning: unknown conversion type character 'l' in format [-Wformat=]
hts_log_warning("Parse error at line %lld", (long long)fp->lineno);
^~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:78:65: note: in definition of macro 'hts_log_warning'
#define hts_log_warning(...) hts_log(HTS_LOG_WARNING, func, VA_ARGS)
^~~~~~~~~~~
sam.c:1439:29: warning: too many arguments for format [-Wformat-extra-args]
hts_log_warning("Parse error at line %lld", (long long)fp->lineno);
^~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/hts_log.h:78:65: note: in definition of macro 'hts_log_warning'
#define hts_log_warning(...) hts_log(HTS_LOG_WARNING, func, VA_ARGS)
^~~~~~~~~~~
sam.c: In function 'bam_hdr_write':
sam.c:233:5: warning: 'strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(buf, "BAM\1", 4);
^~~~~~~~~~~~~~~~~~~~~~~~
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o synced_bcf_reader.o synced_bcf_reader.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o vcf_sweep.o vcf_sweep.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o tbx.o tbx.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o textutils.o textutils.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o thread_pool.o thread_pool.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o vcf.o vcf.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o vcfutils.o vcfutils.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_codecs.o cram/cram_codecs.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_decode.o cram/cram_decode.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_encode.o cram/cram_encode.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_external.o cram/cram_external.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_index.o cram/cram_index.c
"C:/rtools40/mingw32/bin/"gcc -g -Wall -O2 -I. -D_FILE_OFFSET_BITS=64 -I/include -DCURL_STATICLIB -c -o cram/cram_io.o cram/cram_io.c
cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
#include <lzma.h>
^~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Rhtslib.win:131: cram/cram_io.o] Error 1
make[1]: Leaving directory '/c/Users/dell/AppData/Local/Temp/RtmpsTRXyv/R.INSTALL24fc3c222fea/Rhtslib/src-i386/htslib-1.7'
make: *** [Makevars.common:24: htslib] Error 2
ERROR: compilation failed for package 'Rhtslib'

removing 'C:/Users/dell/Documents/R/win-library/4.0/Rhtslib'
Warning in install.packages :
installation of package ‘C:/Users/dell/Documents/R/win-library/4.0/Rhtslib_1.22.0.tar.gz’ had non-zero exit status

标签: r

解决方案


您能否尝试从Bioconductor安装最新版本:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("Rhtslib")

推荐阅读