在没有zlib-devel的情况下编译共享主机上的git [英] Compile git on shared host without zlib-devel
问题描述
我试图在共享的RHEL5主机上编译和安装git,但没有安装zlib-devel库。我已经从RPM中提取了这些库,但无法弄清楚如何让make识别它们。我收到以下消息:
cache.h:17:18:错误:zlib.h:没有这样的文件或目录
尝试了以下操作:
CFLAGS =' - I $ HOME / root / usr / include -L $ HOME / root / usr / lib64'make
但这似乎不起作用。我也尝试设置
C_INCLUDE_PATH ='$ HOME / root / usr / include
再一次,没有运气。有任何想法吗?不用说,zlib.h位于$ HOME / root / usr / include中。
这可以在我自己的Linux机器上使用 / p> 另外,如果您尝试创建64位版本,则不会指定使用64位库链接到某个位置以使其发生。相反,您可以在 如果您必须指定其他非标准库目录,请使用 I'm trying to compile and install git on a shared RHEL5 host, but have no zlib-devel libraries installed. I've extracted the libraries from the RPM, but can't work out how to get make to recognise them. I get the following message: cache.h:17:18: error: zlib.h: No such file or directory Have tried the following: but this doesn't seem to work. I've also tried setting Again, no luck. Any ideas? Needless to say, zlib.h is in $HOME/root/usr/include. Updated as I tried this on my own Linux machine You can use Also, if you are trying to make a 64-bit version, you do not specify linking to a location with 64-bit libraries to make it happen. Instead, you pass the And if you have to specify additional non-standard library directories, use 这篇关于在没有zlib-devel的情况下编译共享主机上的git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! CPPFLAGS
来指定您的附加包含目录。 $ b
CPPFLAGS = - I $ HOME / root / usr / include./configure
CFLAGS
中传递 -m64
编译器标志,如下所示:
CFLAGS = - m64CPPFLAGS = - I $ HOME / root / usr / include./configure
LDFLAGS
。
CFLAGS='-I$HOME/root/usr/include -L$HOME/root/usr/lib64' make
C_INCLUDE_PATH='$HOME/root/usr/include
CPPFLAGS
to specify your additional include directories.CPPFLAGS="-I $HOME/root/usr/include" ./configure
-m64
compiler flag in your CFLAGS
, like this:CFLAGS="-m64" CPPFLAGS="-I $HOME/root/usr/include" ./configure
LDFLAGS
.