我正在尝试使用以下链接在RHEL 6.8上安装R-3.4.0。我满足了所有包装要求,但是当我尝试执行" make"命令,它给出了我关于未定义引用的错误。
https://unix.stackexchange.com/questions/343452/how-to-install-r-3-3-1-in-my-own-directory
/usr/bin/ld: warning: libpcre.so.1, needed by ../../lib/libR.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: liblzma.so.5, needed by ../../lib/libR.so, not found (try using -rpath or -rpath-link)
../../lib/libR.so: undefined reference to `lzma_code@XZ_5.0'
../../lib/libR.so: undefined reference to `lzma_raw_encoder@XZ_5.0'
../../lib/libR.so: undefined reference to `lzma_stream_decoder@XZ_5.0'
../../lib/libR.so: undefined reference to `pcre_free'
../../lib/libR.so: undefined reference to `lzma_lzma_preset@XZ_5.0'
../../lib/libR.so: undefined reference to `lzma_raw_decoder@XZ_5.0'
../../lib/libR.so: undefined reference to `pcre_version'
../../lib/libR.so: undefined reference to `pcre_exec'
../../lib/libR.so: undefined reference to `pcre_config'
../../lib/libR.so: undefined reference to `pcre_fullinfo'
../../lib/libR.so: undefined reference to `pcre_maketables'
../../lib/libR.so: undefined reference to `pcre_compile'
../../lib/libR.so: undefined reference to `pcre_assign_jit_stack'
../../lib/libR.so: undefined reference to `lzma_end@XZ_5.0'
../../lib/libR.so: undefined reference to `lzma_alone_decoder@XZ_5.0'
../../lib/libR.so: undefined reference to `lzma_version_string@XZ_5.0'
../../lib/libR.so: undefined reference to `lzma_crc64@XZ_5.0'
../../lib/libR.so: undefined reference to `pcre_jit_stack_alloc'
../../lib/libR.so: undefined reference to `pcre_study'
../../lib/libR.so: undefined reference to `pcre_free_study'
../../lib/libR.so: undefined reference to `lzma_stream_encoder@XZ_5.0'
collect2: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `xxx/R-3.4.0/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/xxx/R-3.4.0/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/xxx/R-3.4.0/src'
make: *** [R] Error 1
相应地设置这两个选项到目前为止工作不正常,
setenv LD_LIBRARY_PATH $HOME/Programme/pcre-8.40/lib
setenv LD_LIBRARY_PATH $HOME/Programme/xz-5.2.3/lib
有什么建议吗?
答案 0 :(得分:0)
这对我有用
sed -i 's/-lz -lm/-lz -lm -llzma -lbz2/' Makefile