【问题标题】:usr/local/lib/libbz2.a: could not read symbols: Bad valueusr/local/lib/libbz2.a:无法读取符号:错误值
【发布时间】:2020-11-29 06:23:11
【问题描述】:

在安装python时,我收到以下错误:

usr/local/lib/libbz2.a: could not read symbols: Bad value

/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text’ can not be used when making a shared object; recompile with -fPIC

然后使用以下命令安装python。

./configure --prefix=/home/bhanuday/Softwares/Python/installation3/  LDFLAGS='-L/home/bhanuday/Softwares/library/libffi/installation/lib64 -L/home/bhanuday/Softwares/library/bzip2/installation/lib' CFLAGS="-I/home/bhanuday/Softwares/library/bzip2/installation/include"
make
make install

【问题讨论】:

    标签: python installation module bz2


    【解决方案1】:

    问题是,尽管 Python 能够找到 bzip2 安装,但它无法正确使用它。因此,我不得不重新编译 bzip2 安装,并在其 makefile 中进行以下修改。

    我进入 bzip2 源目录,在文本编辑器中打开“makefile”,然后替换以下行

    CC=gcc
    

    CC=gcc -fPIC
    

    然后再次保存文件。使用以下命令重新编译 bzip2:

    make clean
    make
    make install
    

    然后,我编译了 python。而且.. wawwww...不是_bz2模块安装成功。

    感谢发帖:http://matrafox.info/problem-with-ffmpeg-usrlocalliblibbz2-a-could-not-read-symbols-bad-value.html

    【讨论】:

      猜你喜欢
      • 2015-03-29
      • 2016-08-11
      • 1970-01-01
      • 2019-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-05
      • 2014-10-01
      相关资源
      最近更新 更多