gpt4 book ai didi

r - 如何从存档安装 stringi 库并安装本地 icu52l.zip

转载 作者:太空宇宙 更新时间:2023-11-03 16:43:35 27 4
gpt4 key购买 nike

我们正在努力使一些 R 代码在生产环境中工作,作为其中的一部分,我们正在安装一些 R 包,如下所示:

# Default directories and mirrors
WORKING_DIR <- "/srv/foo/bar/baz"

LIB_DIR <- paste( WORKING_DIR, "libs", sep="/" )
setwd(WORKING_DIR)
stringi.loc <- paste( WORKING_DIR, "stringi_0.4-1.tar.gz", sep="/" )

这可能不是安装 R 包的最优雅的方式,但它对我们来说似乎工作正常(欢迎任何其他关于 R 包管理的技巧,但在这个阶段有点晚了:)。

但是,stringi 包似乎依赖于它通过网络安装的 icu52l 包:

checking for R... /usr/lib64/R/bin/R
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for cat... /bin/cat
checking for pkg-config... /usr/bin/pkg-config
checking with pkg-config for ICU4C installed... no
*** The pkg-config script did not detect ICU4C-devel libraries installed
*** We will build ICU4C from sources
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/icu52_found.txt
g++ -I/usr/share/R/include -DNDEBUG -I. -Iicu52 -Iicu52/unicode -Iicu52/common -Iicu52/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DNDEBUG -DU_HAVE_ELF_H -fpic -g -c stri_brkiter.cpp -o stri_brkiter.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -Iicu52 -Iicu52/unicode -Iicu52/common -Iicu52/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DNDEBUG -DU_HAVE_ELF_H -fpic -g -c icu52/i18n/utmscale.c -o icu52/i18n/utmscale.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -Iicu52 -Iicu52/unicode -Iicu52/common -Iicu52/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DNDEBUG -DU_HAVE_ELF_H -fpic -g -c icu52/stubdata/stubdata.c -o icu52/stubdata/stubdata.o
g++ -shared -o stringi.so stri_brkiter.o stri_collator.o stri_common.o stri_compare.o stri_container_base.o stri_container_bytesearch.o stri_container_listint.o stri_container_listraw.o stri_container_listutf8.o stri_container_regex.o stri_container_usearch.o stri_container_utf16.o stri_container_utf8.o stri_container_utf8_indexable.o stri_encoding_conversion.o stri_encoding_detection.o stri_encoding_management.o stri_escape.o stri_exception.o stri_ICU_settings.o stri_join.o stri_length.o stri_pad.o stri_prepare_arg.o stri_random.o stri_reverse.o stri_search_class_count.o stri_search_class_detect.o stri_search_class_extract.o stri_search_class_locate.o stri_search_class_replace.o stri_search_class_split.o stri_search_class_startsendswith.o stri_search_class_subset.o stri_search_class_trim.o stri_search_common.o stri_search_coll_count.o stri_search_coll_detect.o stri_search_coll_extract.o stri_search_coll_locate.o stri_search_coll_replace.o stri_search_coll_split.o stri_search_coll_startsendswith.o stri_search_coll_subset.o stri_search_boundaries_count.o stri_search_boundaries_locate.o stri_search_boundaries_split.o stri_search_fixed_count.o stri_search_fixed_detect.o stri_search_fixed_extract.o stri_search_fixed_locate.o stri_search_fixed_replace.o stri_search_fixed_split.o stri_search_fixed_subset.o stri_search_fixed_startsendswith.o stri_search_in.o stri_search_other_replace.o stri_search_other_split.o stri_search_regex_count.o stri_search_regex_detect.o stri_search_regex_extract.o stri_search_regex_locate.o stri_search_regex_match.o stri_search_regex_replace.o stri_search_regex_split.o stri_search_regex_subset.o stri_stats.o stri_stringi.o stri_sub.o stri_test.o stri_trans_casemap.o stri_trans_normalization.o stri_trans_transliterate.o stri_ucnv.o stri_uloc.o stri_utils.o stri_wrap.o icu52/common/appendable.o icu52/common/bmpset.o icu52/common/brkeng.o icu52/common/brkiter.o icu52/common/bytestream.o icu52/common/bytestrie.o icu52/common/bytestriebuilder.o icu52/common/bytestrieiterator.o icu52/common/caniter.o icu52/common/chariter.o icu52/common/charstr.o icu52/common/dictbe.o icu52/common/dictionarydata.o icu52/common/dtintrv.o icu52/common/errorcode.o icu52/common/filterednormalizer2.o icu52/common/listformatter.o icu52/common/locavailable.o icu52/common/locbased.o icu52/common/locdispnames.o icu52/common/locid.o icu52/common/loclikely.o icu52/common/locresdata.o icu52/common/locutil.o icu52/common/messagepattern.o icu52/common/normalizer2.o icu52/common/normalizer2impl.o icu52/common/normlzr.o icu52/common/parsepos.o icu52/common/patternprops.o icu52/common/propname.o icu52/common/punycode.o icu52/common/putil.o icu52/common/rbbi.o icu52/common/rbbidata.o icu52/common/rbbinode.o icu52/common/rbbirb.o icu52/common/rbbiscan.o icu52/common/rbbisetb.o icu52/common/rbbistbl.o icu52/common/rbbitblb.o icu52/common/resbund_cnv.o icu52/common/resbund.o icu52/common/ruleiter.o icu52/common/schriter.o icu52/common/serv.o icu52/common/servlk.o icu52/common/servlkf.o icu52/common/servls.o icu52/common/servnotf.o icu52/common/servrbf.o icu52/common/servslkf.o icu52/common/stringpiece.o icu52/common/stringtriebuilder.o icu52/common/ubrk.o icu52/common/ucase.o icu52/common/ucasemap_titlecase_brkiter.o icu52/common/ucasemap.o icu52/common/ucharstrie.o icu52/common/ucharstriebuilder.o icu52/common/ucharstrieiterator.o icu52/common/uchriter.o icu52/common/ucnv_bld.o icu52/common/ucnv_ext.o icu52/common/ucnv_io.o icu52/common/ucnv2022.o icu52/common/ucnvbocu.o icu52/common/ucnvsel.o icu52/common/ucol_swp.o icu52/common/udata.o icu52/common/uhash_us.o icu52/common/uidna.o icu52/common/uinit.o icu52/common/uiter.o icu52/common/uloc.o icu52/common/umutex.o icu52/common/unames.o icu52/common/unifilt.o icu52/common/unifunct.o icu52/common/uniset_closure.o icu52/common/uniset_props.o icu52/common/uniset.o icu52/common/unisetspan.o icu52/common/unistr_case_locale.o icu52/common/unistr_case.o icu52/common/unistr_cnv.o icu52/common/unistr_props.o icu52/common/unistr_titlecase_brkiter.o icu52/common/unistr.o icu52/common/unorm.o icu52/common/unormcmp.o icu52/common/uobject.o icu52/common/uprops.o icu52/common/uresbund.o icu52/common/uscript_props.o icu52/common/uset_props.o icu52/common/uset.o icu52/common/usetiter.o icu52/common/ushape.o icu52/common/usprep.o icu52/common/ustack.o icu52/common/ustr_titlecase_brkiter.o icu52/common/ustr_wcs.o icu52/common/ustrcase_locale.o icu52/common/ustrcase.o icu52/common/ustrenum.o icu52/common/ustring.o icu52/common/ustrtrns.o icu52/common/utext.o icu52/common/util_props.o icu52/common/util.o icu52/common/utrie.o icu52/common/utrie2_builder.o icu52/common/utrie2.o icu52/common/uts46.o icu52/common/uvector.o icu52/common/uvectr32.o icu52/common/uvectr64.o icu52/common/cmemory.o icu52/common/cstring.o icu52/common/cwchar.o icu52/common/icudataver.o icu52/common/icuplug.o icu52/common/locmap.o icu52/common/propsvec.o icu52/common/uarrsort.o icu52/common/ubidi_props.o icu52/common/ubidi.o icu52/common/ubidiln.o icu52/common/ubidiwrt.o icu52/common/ucat.o icu52/common/uchar.o icu52/common/ucln_cmn.o icu52/common/ucmndata.o icu52/common/ucnv_cb.o icu52/common/ucnv_cnv.o icu52/common/ucnv_ct.o icu52/common/ucnv_err.o icu52/common/ucnv_lmb.o icu52/common/ucnv_set.o icu52/common/ucnv_u16.o icu52/common/ucnv_u32.o icu52/common/ucnv_u7.o icu52/common/ucnv_u8.o icu52/common/ucnv.o icu52/common/ucnvdisp.o icu52/common/ucnvhz.o icu52/common/ucnvisci.o icu52/common/ucnvlat1.o icu52/common/ucnvmbcs.o icu52/common/ucnvscsu.o icu52/common/udatamem.o icu52/common/udataswp.o icu52/common/uenum.o icu52/common/uhash.o icu52/common/uinvchar.o icu52/common/ulist.o icu52/common/uloc_tag.o icu52/common/umapfile.o icu52/common/umath.o icu52/common/unorm_it.o icu52/common/ures_cnv.o icu52/common/uresdata.o icu52/common/usc_impl.o icu52/common/uscript.o icu52/common/ustr_cnv.o icu52/common/ustrfmt.o icu52/common/utf_impl.o icu52/common/utrace.o icu52/common/utypes.o icu52/common/wintz.o icu52/i18n/alphaindex.o icu52/i18n/anytrans.o icu52/i18n/astro.o icu52/i18n/basictz.o icu52/i18n/bocsu.o icu52/i18n/brktrans.o icu52/i18n/buddhcal.o icu52/i18n/calendar.o icu52/i18n/casetrn.o icu52/i18n/cecal.o icu52/i18n/chnsecal.o icu52/i18n/choicfmt.o icu52/i18n/coleitr.o icu52/i18n/coll.o icu52/i18n/compactdecimalformat.o icu52/i18n/coptccal.o icu52/i18n/cpdtrans.o icu52/i18n/csdetect.o icu52/i18n/csmatch.o icu52/i18n/csr2022.o icu52/i18n/csrecog.o icu52/i18n/csrmbcs.o icu52/i18n/csrsbcs.o icu52/i18n/csrucode.o icu52/i18n/csrutf8.o icu52/i18n/curramt.o icu52/i18n/currfmt.o icu52/i18n/currpinf.o icu52/i18n/currunit.o icu52/i18n/dangical.o icu52/i18n/datefmt.o icu52/i18n/dcfmtsym.o icu52/i18n/decfmtst.o icu52/i18n/decimfmt.o icu52/i18n/digitlst.o icu52/i18n/dtfmtsym.o icu52/i18n/dtitvfmt.o icu52/i18n/dtitvinf.o icu52/i18n/dtptngen.o icu52/i18n/dtrule.o icu52/i18n/esctrn.o icu52/i18n/ethpccal.o icu52/i18n/fmtable_cnv.o icu52/i18n/fmtable.o icu52/i18n/format.o icu52/i18n/fphdlimp.o icu52/i18n/fpositer.o icu52/i18n/funcrepl.o icu52/i18n/gender.o icu52/i18n/gregocal.o icu52/i18n/gregoimp.o icu52/i18n/hebrwcal.o icu52/i18n/identifier_info.o icu52/i18n/indiancal.o icu52/i18n/inputext.o icu52/i18n/islamcal.o icu52/i18n/japancal.o icu52/i18n/locdspnm.o icu52/i18n/measfmt.o icu52/i18n/measure.o icu52/i18n/msgfmt.o icu52/i18n/name2uni.o icu52/i18n/nfrs.o icu52/i18n/nfrule.o icu52/i18n/nfsubs.o icu52/i18n/nortrans.o icu52/i18n/nultrans.o icu52/i18n/numfmt.o icu52/i18n/numsys.o icu52/i18n/olsontz.o icu52/i18n/persncal.o icu52/i18n/plurfmt.o icu52/i18n/plurrule.o icu52/i18n/quant.o icu52/i18n/rbnf.o icu52/i18n/rbt_data.o icu52/i18n/rbt_pars.o icu52/i18n/rbt_rule.o icu52/i18n/rbt_set.o icu52/i18n/rbt.o icu52/i18n/rbtz.o icu52/i18n/regexcmp.o icu52/i18n/regeximp.o icu52/i18n/regexst.o icu52/i18n/regextxt.o icu52/i18n/region.o icu52/i18n/reldtfmt.o icu52/i18n/rematch.o icu52/i18n/remtrans.o icu52/i18n/repattrn.o icu52/i18n/scriptset.o icu52/i18n/search.o icu52/i18n/selfmt.o icu52/i18n/simpletz.o icu52/i18n/smpdtfmt.o icu52/i18n/smpdtfst.o icu52/i18n/sortkey.o icu52/i18n/strmatch.o icu52/i18n/strrepl.o icu52/i18n/stsearch.o icu52/i18n/taiwncal.o icu52/i18n/tblcoll.o icu52/i18n/timezone.o icu52/i18n/titletrn.o icu52/i18n/tmunit.o icu52/i18n/tmutamt.o icu52/i18n/tmutfmt.o icu52/i18n/tolowtrn.o icu52/i18n/toupptrn.o icu52/i18n/translit.o icu52/i18n/transreg.o icu52/i18n/tridpars.o icu52/i18n/tzfmt.o icu52/i18n/tzgnames.o icu52/i18n/tznames_impl.o icu52/i18n/tznames.o icu52/i18n/tzrule.o icu52/i18n/tztrans.o icu52/i18n/ucal.o icu52/i18n/ucol_bld.o icu52/i18n/ucol_cnt.o icu52/i18n/ucol_elm.o icu52/i18n/ucol_res.o icu52/i18n/ucol_sit.o icu52/i18n/ucol_tok.o icu52/i18n/ucol_wgt.o icu52/i18n/ucol.o icu52/i18n/ucoleitr.o icu52/i18n/ucsdet.o icu52/i18n/ucurr.o icu52/i18n/udat.o icu52/i18n/udateintervalformat.o icu52/i18n/udatpg.o icu52/i18n/umsg.o icu52/i18n/unesctrn.o icu52/i18n/uni2name.o icu52/i18n/unum.o icu52/i18n/unumsys.o icu52/i18n/upluralrules.o icu52/i18n/uregex.o icu52/i18n/uregexc.o icu52/i18n/uregion.o icu52/i18n/usearch.o icu52/i18n/uspoof_build.o icu52/i18n/uspoof_conf.o icu52/i18n/uspoof_impl.o icu52/i18n/uspoof_wsconf.o icu52/i18n/uspoof.o icu52/i18n/utrans.o icu52/i18n/vtzone.o icu52/i18n/vzone.o icu52/i18n/windtfmt.o icu52/i18n/winnmfmt.o icu52/i18n/wintzimpl.o icu52/i18n/zonemeta.o icu52/i18n/zrule.o icu52/i18n/ztrans.o icu52/i18n/decContext.o icu52/i18n/decNumber.o icu52/i18n/ucln_in.o icu52/i18n/ulocdata.o icu52/i18n/utmscale.o icu52/stubdata/stubdata.o -L/usr/lib64/R/lib -lR'
DBG: Stderr is '* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** libs
icu52/i18n/ucol_sit.cpp: In function ‘int32_t ucol_getUnsafeSet_52(const UCollator*, USet*, UErrorCode*)’:
icu52/i18n/ucol_sit.cpp:933: warning: ‘int32_t ucol_getContractions_52(const UCollator*, USet*, UErrorCode*)’ is deprecated (declared at icu52/i18n/ucol_sit.cpp:849)
icu52/i18n/ucol_sit.cpp:933: warning: ‘int32_t ucol_getContractions_52(const UCollator*, USet*, UErrorCode*)’ is deprecated (declared at icu52/i18n/ucol_sit.cpp:849)
installing via 'install.libs.R' to /srv/adzuna/value-my-cv/career_explorer/libs/stringi
downloading ICU data library (icudt)
the files will be extracted to: /srv/adzuna/value-my-cv/career_explorer/libs/stringi/libs
no icudt in a local repo
trying URL 'http://static.rexamine.com/packages/icudt52l.zip'
Content type 'application/zip' length 10154575 bytes (9.7 Mb)
opened URL
==================================================
downloaded 9.7 Mb

icudt fetch OK
decompressing downloaded archive
icudt has been installed successfully
restart R to apply changes
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*

我们如何告诉它寻找本地副本?输出很方便地包含了远程位置 ( http://static.rexamine.com/packages/icudt52l.zip ),因此我们可以自己将它放在某个地方,但不确定放在哪里。

也许我们正在以完全错误的方式解决这个问题,但我们欢迎任何帮助或指点。

我们在 ubuntu 机器上,也尝试安装 libicu42 和 libicu-dev 但这些似乎都没有帮助。

最佳答案

这将在即将推出的 stringi 0.5-1 版本中得到修复,请参阅 this feature request .

./configure 脚本现在使用适当的环境变量 (ICUDT_DIR) 来指示 icudt 的本地副本所在的目录> 应该被提取。它可以通过调用提供,例如:

install.packages("stringi_0.5-1.zip", # assuming that we install from a downloaded archive
configure.vars="ICUDT_DIR=<dir_to_copy_icudt_from>")

关于r - 如何从存档安装 stringi 库并安装本地 icu52l.zip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27553452/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com