0

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
4

1 に答える 1

0

問題は、Python が bzip2 のインストールを検出できたにもかかわらず、それを適切に使用できなかったことです。そのため、makefile に次の変更を加えて、bzip2 インストールを再コンパイルする必要がありました。

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

于 2020-08-09T13:14:18.327 に答える