Невозможно установить пакет stringi в R 3.4.2 на Redhat - PullRequest
0 голосов
/ 09 мая 2018

ОС: 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.

Я подтвердил, что у меня все пакеты gcc установлены через yum, и, похоже, он правильно определяет G ++. Требуется ли дополнительный нестандартный пакет для успешной компиляции?

Я также искал пакеты devel ICU4C на случай, если это было необходимо для ошибки «build ICU-based project», но не смог найти там ничего. Конечно, пакет ICU, доступный в yum, равен 50.2, слишком стар для установки stringi.

Я также попытался установить, используя stringi-master zip, с похожими результатами.

Я уверен, что многие другие люди сталкивались с этим раньше - любые предложения будут с благодарностью.

Заранее спасибо.

1 Ответ

0 голосов
/ 22 мая 2018

У меня была похожая проблема с установкой stringi в контейнере CentOS 6 Docker, и я добавил следующее в install.packages (...), и это помогло с проблемой ICU4C: configure.args = '- disable- cxx11.

Так что в вашем случае, так как вы используете R CMD INSTALL, я представляю команду: ./R CMD INSTALL stringi_1.2.2.tar.gz --configure-args = '- disable-cxx11'

См. https://github.com/gagolews/stringi/issues/296 для обсуждения.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...