Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Error while installing #2316

Closed
Somebi opened this issue Dec 12, 2011 · 14 comments
Closed

Error while installing #2316

Somebi opened this issue Dec 12, 2011 · 14 comments
Labels

Comments

@Somebi
Copy link

Somebi commented Dec 12, 2011

root@randevu:/opt/node# python --version
Python 2.7.2

git clone git://github.com/joyent/node.git
git checkout v0.6.3

and then:

root@randevu:/opt/node# ./configure && make && sudo make install
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : not found
Checking for function SSL_library_init : yes
Checking for header openssl/crypto.h : yes
Checking for library util : yes
Checking for library rt : yes
Checking for fdatasync(2) with c++ : yes
'configure' finished successfully (4.649s)
Waf: Entering directory /opt/node/out' DEST_OS: linux DEST_CPU: ia32 Parallel Jobs: 1 Product type: program [ 5/35] libv8.a: deps/v8/SConstruct -> out/Release/libv8.a /usr/local/bin/python "/opt/node/tools/scons/scons.py" -j 1 -C "/opt/node/out/Release/" -Y "/opt/node/deps/v8" visibility=default mode=release arch=ia32 toolchain=gcc library=static snapshot=on scons: Reading SConscript files ... ImportError: No module named bz2: File "/opt/node/deps/v8/SConstruct", line 37: import js2c, utils File "/opt/node/deps/v8/tools/js2c.py", line 36: import bz2 Waf: Leaving directory/opt/node/out'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
make: *** [program] Error 1
root@randevu:/opt/node#

That's it.

Where to take this bz2 module? Bzip as i understand. It's python module? Wasn't it added in Pythong 2.3 version or there is used another bzip module?

@ghost
Copy link

ghost commented Dec 12, 2011

Does this happen in version 0.6.5?

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

I'll check, just a moment.

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

Did git checkout v0.6.5

Went a bit further, but still this error:

_FILE_OFFSET_BITS=64 -Isrc/ares/config_linux src/ares/inet_net_pton.c -DHAVE_CONFIG_H
/usr/bin/gcc -o src/ares/inet_ntop.o -c -g -Iinclude -Iinclude/uv-private -Isrc/unix/ev -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Isrc/ares/config_linux src/ares/inet_ntop.c -DHAVE_CONFIG_H
ar rcs uv.a src/unix/core.o src/unix/dl.o src/unix/fs.o src/unix/cares.o src/unix/udp.o src/unix/error.o src/unix/process.o src/unix/tcp.o src/unix/pipe.o src/unix/tty.o src/unix/stream.o src/unix/linux.o src/uv-common.o src/unix/uv-eio.o src/unix/ev/ev.o src/unix/eio/eio.o src/ares/ares__close_sockets.o src/ares/ares__get_hostent.o src/ares/ares__read_line.o src/ares/ares__timeval.o src/ares/ares_cancel.o src/ares/ares_data.o src/ares/ares_destroy.o src/ares/ares_expand_name.o src/ares/ares_expand_string.o src/ares/ares_fds.o src/ares/ares_free_hostent.o src/ares/ares_free_string.o src/ares/ares_gethostbyaddr.o src/ares/ares_gethostbyname.o src/ares/ares_getnameinfo.o src/ares/ares_getopt.o src/ares/ares_getsock.o src/ares/ares_init.o src/ares/ares_library_init.o src/ares/ares_llist.o src/ares/ares_mkquery.o src/ares/ares_nowarn.o src/ares/ares_options.o src/ares/ares_parse_a_reply.o src/ares/ares_parse_aaaa_reply.o src/ares/ares_parse_mx_reply.o src/ares/ares_parse_ns_reply.o src/ares/ares_parse_ptr_reply.o src/ares/ares_parse_srv_reply.o src/ares/ares_parse_txt_reply.o src/ares/ares_process.o src/ares/ares_query.o src/ares/ares_search.o src/ares/ares_send.o src/ares/ares_strcasecmp.o src/ares/ares_strdup.o src/ares/ares_strerror.o src/ares/ares_timeout.o src/ares/ares_version.o src/ares/ares_writev.o src/ares/bitncmp.o src/ares/inet_net_pton.o src/ares/inet_ntop.o
make[1]: Leaving directory /opt/node/out/Release/deps/uv' [ 5/35] libv8.a: deps/v8/SConstruct -> out/Release/libv8.a /usr/local/bin/python "/opt/node/tools/scons/scons.py" -j 1 -C "/opt/node/out/Release/" -Y "/opt/node/deps/v8" visibility=default mode=release arch=ia32 toolchain=gcc library=static snapshot=on scons: Reading SConscript files ... ImportError: No module named bz2: File "/opt/node/deps/v8/SConstruct", line 37: import js2c, utils File "/opt/node/deps/v8/tools/js2c.py", line 36: import bz2 Waf: Leaving directory/opt/node/out'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
make: *** [program] Error 1
root@randevu:/opt/node#

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

Updated to lastest Python 3.2.2. But still no go.

@ghost
Copy link

ghost commented Dec 12, 2011

Did you compile Python from source of use the built in Python version? Run which python and which python 2.7

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

I have downloaded ziped package and compiled it.

root@randevu:/opt/bzip2-1.0.6# which python
/usr/local/bin/python
root@randevu:/opt/bzip2-1.0.6# which python 2.7
/usr/local/bin/python
root@randevu:/opt/bzip2-1.0.6#

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

Just installed bzip2 manually from here:

http://www.bzip.org/downloads.html

root@randevu:/opt/bzip2-1.0.6# bzip2 --version
bzip2, a block-sorting file compressor. Version 1.0.6, 6-Sept-2010.

Copyright (C) 1996-2010 by Julian Seward.

This program is free software; you can redistribute it and/or modify
it under the terms set out in the LICENSE file, which is included
in the bzip2-1.0.6 source distribution.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
LICENSE file for more details.

bzip2: I won't write compressed data to a terminal.
bzip2: For help, type: `bzip2 --help'.
root@randevu:/opt/bzip2-1.0.6#

@ghost
Copy link

ghost commented Dec 12, 2011

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

root@randevu:/opt/node# pydoc modules

Please wait a moment while I gather a list of all available modules...

BaseHTTPServer atexit importlib shlex
Bastion audiodev imputil shutil
CDROM audioop inspect signal
CGIHTTPServer base64 io site
Canvas bdb itertools smtpd
ConfigParser binascii json smtplib
Cookie binhex keyword sndhdr
DLFCN bisect lib2to3 socket
Dialog bsddb linecache spwd
DocXMLRPCServer cPickle linuxaudiodev sqlite3
FileDialog cProfile locale sre
FixTk cStringIO logging sre_compile
HTMLParser calendar macpath sre_constants
IN cgi macurl2path sre_parse
MimeWriter cgitb mailbox ssl
Queue chunk mailcap stat
ScrolledText cmath markupbase statvfs
SimpleDialog cmd marshal string
SimpleHTTPServer code math stringold
SimpleXMLRPCServer codecs md5 stringprep
SocketServer codeop mhlib strop
StringIO collections mimetools struct
TYPES colorsys mimetypes subprocess
Tix commands mimify sunau
Tkconstants compileall mmap sunaudio
Tkdnd compiler modulefinder symbol
Tkinter contextlib multifile symtable
UserDict cookielib multiprocessing sys
UserList copy mutex sysconfig
UserString copy_reg netrc syslog
_LWPCookieJar crypt new tabnanny
_MozillaCookieJar csv nis tarfile
builtin ctypes nntplib telnetlib
future curses ntpath tempfile
_abcoll datetime nturl2path termios
_ast dbhash numbers test
_bisect decimal opcode textwrap
_codecs difflib operator this
_codecs_cn dircache optparse thread
_codecs_hk dis os threading
_codecs_iso2022 distutils os2emxpath time
_codecs_jp dl ossaudiodev timeit
_codecs_kr doctest parser tkColorChooser
_codecs_tw dumbdbm pdb tkCommonDialog
_collections dummy_thread pickle tkFileDialog
_csv dummy_threading pickletools tkFont
_ctypes email pipes tkMessageBox
_ctypes_test encodings pkgutil tkSimpleDialog
_elementtree errno platform toaiff
_functools exceptions plistlib token
_hashlib fcntl popen2 tokenize
_heapq filecmp poplib trace
_hotshot fileinput posix traceback
_io fnmatch posixfile ttk
_json formatter posixpath tty
_locale fpformat pprint turtle
_lsprof fractions profile types
_multibytecodec ftplib pstats unicodedata
_multiprocessing functools pty unittest
_pyio future_builtins pwd urllib
_random gc py_compile urllib2
_socket genericpath pyclbr urlparse
_sre getopt pydoc user
_ssl getpass pydoc_data uu
_strptime gettext pyexpat uuid
_struct glob quopri warnings
_symtable grp random wave
_testcapi gzip re weakref
_threading_local hashlib repr webbrowser
_warnings heapq resource whichdb
_weakref hmac rexec wsgiref
_weakrefset hotshot rfc822 xdrlib
abc htmlentitydefs rlcompleter xml
aifc htmllib robotparser xmllib
antigravity httplib runpy xmlrpclib
anydbm idlelib sched xxsubtype
argparse ihooks select zipfile
array imageop sets zipimport
ast imaplib sgmllib zlib
asynchat imghdr sha
asyncore imp shelve

Enter any module name to get more help. Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

root@randevu:/opt/node#

Shouldn't bz / bzip be in the list? How could this be?

@bnoordhuis
Copy link
Member

This is an issue with your build environment, not Node's build system. Your python is compiled without bz2 support. Either recompile or use your distro's python, bz2 is part of the core python package on most if not all major distros.

@Somebi
Copy link
Author

Somebi commented Dec 12, 2011

Thanks i have followed and deleted everything from old python versions. Installed fresh package and all went ok it seems.

@jhuttner
Copy link

jhuttner commented Mar 3, 2012

Install bzip2. (For me, "yum install bzip2-devel"). Then recompile Python. Make sure you can import bz2 from a Python prompt. If you can't, you messed up. Try again.

Then install Node again and it will work fine.

@revolunet
Copy link

FYI, python on debian doesnt have builtin bz2 support. so you need te reconfigure python with bz2 support :

  • wget python (from http://www.python.org/getit/ )
  • apt-get install libbz2-dev
  • ./configure --enable-shared && make && make install
  • then edit the firstline of node/Makefile to the new python path

@tranphuoctien
Copy link

Thank @jhuttner it's really work fine!
yum install bzip2-devel
after that we must reinstall python.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants