[英]"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.