操作系统:Redhat 7.4
R: 3.4.2
stringi: 1.2.2
您好,我一直在为我们的业务用户配置R存储库。不幸的是,我在尝试安装stringi时遇到了困难。我在尝试安装时遇到了错误,到目前为止我的研究还没有发现。我确信这些问题之一在回顾过程中可能会非常明显。
root@ljtp000018:PROD:bin> ./R CMD INSTALL stringi_1.2.2.tar.gz
* installing to library ‘/home/rrepo/R_Home/R-3.4.2/library’
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for R_HOME... /home/rrepo/R_Home/R-3.4.2
checking for R... /home/rrepo/R_Home/R-3.4.2/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for local ICUDT_DIR... icu61/data
checking for cat... /usr/bin/cat
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 how to run the C preprocessor... /lib/cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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
checking whether we are using the GNU C++ compiler... no
checking whether accepts -g... no
checking whether the C++ compiler supports the long long type... no
*** trying with disabled C++11 compiler
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether the C++ compiler supports the long long type... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler supports Standard Template Library... yes
checking whether std::map is available... yes
checking for pkg-config... /usr/bin/pkg-config
checking with pkg-config for the system ICU4C... 61.1
checking for ICU4C >= 52... yes
checking for additional required CPPFLAGS, LDFLAGS, and LIBS... done
checking whether we may build an ICU4C-based project... no
*** The available ICU4C cannot be used
checking whether we may compile src/icu61/common/putil.cpp... no
checking whether we may compile src/icu61/common/putil.cpp with -D_XPG6... no
*** The ICU4C bundle could not be build. Upgrade your compiler flags.
ERROR: configuration failed for package ‘stringi’
* removing ‘/home/rrepo/R_Home/R-3.4.2/library/stringi’
该脚本似乎有两个错误 - 无法构建基于ICU4的项目,然后无法编译.cpp文件。
我已经验证我通过yum安装了所有gcc软件包,它确实可以正确检测G ++。是否需要额外的非标准包才能成功编译?
我还搜索了ICU4C devel软件包,以防需要构建基于ICU的项目&#34;错误,但无法找到任何东西。当然,yum中提供的ICU包是50.2,对于stringi来说太旧了。
我还尝试使用stringi-master zip进行安装,结果类似。
我确信很多其他人之前也遇到过这种情况 - 我们将非常感谢任何建议。
提前致谢。
答案 0 :(得分:1)
我在CentOS 6 Docker容器上安装stringi时遇到了类似的问题,我在install.packages(...)中添加了以下内容,它帮助解决了ICU4C问题:configure.args =' - disable- cxx11' 。
所以在你的情况下,既然你正在使用R CMD INSTALL,我想这个命令将是: ./R CMD INSTALL stringi_1.2.2.tar.gz --configure-args =' - disable-cxx11'