简体   繁体   English

在 $HOME 下安装 R-4.2.2 和依赖项时出现“需要 liblzma 库和标头”

[英]"liblzma library and headers are required" when installing R-4.2.2 and dependencies under $HOME

I am installing R-4.2.2 under my $HOME path on a Red Hat 4.8.5-28 server.我在 Red Hat 4.8.5-28 服务器上的$HOME路径下安装 R-4.2.2。

When I run ./configure --prefix=$HOME/R --enable-R-shlib I found the error:当我运行./configure --prefix=$HOME/R --enable-R-shlib ,我发现了错误:

checking whether bzip2 support suffices... yes
checking for lzma_version_number in -llzma... no
configure: error: "liblzma library and headers are required"

I have install xz-5.2.2 , and the headers and library have already been under $HOME/local/include and $HOME/local/lib .我已经安装了xz-5.2.2 ,头文件和库已经在$HOME/local/include$HOME/local/lib下。 The path of the library has also been added to the $C_INCLUDE_PATH and $LD_LIBRARY_PATH .库的路径也已添加到$C_INCLUDE_PATH$LD_LIBRARY_PATH中。 I am not install them to the default path by ways like yum because I do not have the permission.我没有通过yum之类的方式将它们安装到默认路径,因为我没有权限。

LD_LIBRARY_PATH is used by the dynamic linker at runtime . LD_LIBRARY_PATH动态链接器运行时使用。 The variable plays no role for compilation (and even for runtime configuration it has serious issues and is generally best avoided).该变量对编译没有任何作用(即使对于运行时配置,它也有严重的问题,通常最好避免)。

You would normally set LDFLAGS to include the appropriate library paths.您通常会设置LDFLAGS以包含适当的库路径。 However, this should be done by the configure script , not by you.但是,这应该configure脚本完成,而不是由您完成。 Instead, you would pass the appropriate command line flags to the configure script (something like --with-lzma=the/path ), or by configuring the PKG_CONFIG_PATH .相反,您可以将适当的命令行标志传递给configure脚本(类似于--with-lzma=the/path ),或者通过配置PKG_CONFIG_PATH

The same is true for the C_INCLUDE_PATH environment variable, incidentally: setting it manually before invoking ./configure is rarely a good idea. C_INCLUDE_PATH环境变量也是如此,顺便说一句:在调用./configure之前手动设置它很少是一个好主意。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 问题:在openSUSE Leap 15.0上安装R:“需要liblzma库和标头” - Issue: Installing R on openSUSE Leap 15.0: “liblzma library and headers are required” 在 R foreach() 下并行运行时无法识别动态库依赖项 - Dynamic library dependencies not recognized when run in parallel under R foreach() 在 Linux 上安装 R:配置:错误:libcurl >= 7.28.0 库和头文件需要支持 https - Installing R on Linux: configure: error: libcurl >= 7.28.0 library and headers are required with support for https 在 OSX 中使用共享库安装 R - 缺少 liblzma 库 - Install R with shared library in OSX - liblzma library missing 在Ubuntu上配置安装R-3.3.2的错误:检查bzip2支持是否足够... configure:error:需要bzip2库和头文件 - configure error installing R-3.3.2 on Ubuntu: checking whether bzip2 support suffices… configure: error: bzip2 library and headers are required 从 R 中的源安装时的 Package 依赖项 - Package dependencies when installing from source in R R 4.0.0 “配置:错误:需要 zlib 库和头文件” - R 4.0.0 "configure: error: zlib library and headers are required" 无法配置 R 语言“需要 bzip2 库和头文件” - can not config R Language "bzip2 library and headers are required" 安装 R package 时,需要时自动重新安装依赖项 - When installing an R package, automatically reinstall dependencies when needed R 在安装包依赖项时不考虑最大版本 - R doesn't respect maximum version when installing package dependencies
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM