Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

bz2 and python installation #3504

Closed
Ayms opened this Issue Jun 21, 2012 · 9 comments

Comments

Projects
None yet
6 participants

Ayms commented Jun 21, 2012

This is related to issue #2316

I followed the README for recent node versions stating that python 2.6 or 2.7 is needed, and then I spent quite a long time before succeeding to compile Python with bz2

Maybe it's specific to my environment and I don't install unix stuff everyday but I think the README desserves at least a mention in case of python/bz2 installation problem and at least links to these two bugs

In my case, it was solved following this :

http://stackoverflow.com/questions/812781/pythons-bz2-module-not-compiled-by-default
http://www.kelvinwong.ca/2010/08/02/python-2-7-on-dreamhost/

But both methods are not totally correct (in my case at least), the correct sequence is more something like (sorry for the imprecision but I spent enough time on this, probably some people can correct easily if needed) :

wget http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar xpzf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make -f Makefile_libbz2_so
make
make install PREFIX=/usr/local
cp ./libbz2.so.1.0.6 /usr/local/lib

cd Python-2.7.3
./configure --prefix=/usr/local
make install

Owner

bnoordhuis commented Jun 21, 2012

I feel your pain but I suggest that you complain to your distro vendor that it should install python-bz2 along with python-core. (Unless your vendor is Apple, then you're probably SOL.)

Owner

bnoordhuis commented Jun 21, 2012

I'll entertain documentation patches, though.

Ayms commented Jun 21, 2012

??? I am not complaining (against Node) but taking (more) time to report it for the others in order to ameliorate things

Note : I am trying to install v0.7.10 and this fails too without saying why, I suppose there is nothing against installing this version ?

go ahead and reopen if this is really still a thing.

@trevnorris trevnorris closed this Jul 26, 2013

chovy commented Aug 13, 2013

I still have this problem on debian/squeeze.

Ayms commented Jan 20, 2014

New server on Debian with Python not installed and same problem, I think you should include this somewhere in the documentation.

Small correction/complement for the fix:

DO NOT INSTALL BZIP2 NORMALLY BEFORE DOING THIS OR REMOVE IT:

wget http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar -xvf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make -f Makefile-libbz2_so
make
make install PREFIX=/usr/local
cp libbz2.so.1.0.6 /usr/local/lib

cd Python-2.7.3
./configure --prefix=/usr/local
make install

vipints commented Apr 6, 2015

thanks @Ayms for the bz2 installation recipe

Ayms commented Apr 8, 2015

You're welcome, since the problem is systematic I still think it should be documented in the nodejs installation doc.

Thank You very much all.It worked for me.Tnx again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment