【问题标题】:Glibc static linkingGlibc 静态链接
【发布时间】:2012-04-26 12:45:35
【问题描述】:

我尝试安装 Perl 模块,但在某些时候我收到此错误:

    chmod 644 SSH2.bs
rm -f blib/arch/auto/Net/SSH2/SSH2.so
LD_RUN_PATH="/usr/lib:/lib" cc  -shared -O2 -L/usr/local/lib -fstack-protector SSH2.o  -o blib/arch/auto/Net/SSH2/SSH2.so   \
       -L/root -L/usr/local/lib -L/lib -L/usr/lib -L/usr/local/lib -L/usr/local -L/usr/lib -L/usr -L/opt -L//lib -L/ -lssh2 -lz -lssl -lcrypto      \

/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Net/SSH2/SSH2.so] Error 1
-> FAIL Installing Net::SSH2 failed. See /root/.cpanm/build.log for details.

我在其他论坛上发现了这样一行

/usr/bin/ld: cannot find -lz

意味着我缺少 glibc-static 包。但是我在 CentOS 5 上运行它并且在任何存储库中都没有 glibc-static 包?这个包是否有其他替代名称,或者我走错了方向?

问候!

【问题讨论】:

    标签: perl glibc static-linking


    【解决方案1】:

    不,-lz 指的是 libz,zlib 压缩库。我确定 CentOS 有这个——你可能想要安装“zlib-devel”包。

    【讨论】:

      猜你喜欢
      • 2013-01-12
      • 2010-10-01
      • 1970-01-01
      • 2012-05-09
      • 2016-08-21
      • 1970-01-01
      • 1970-01-01
      • 2019-12-19
      相关资源
      最近更新 更多